Skip to content

Commit

Permalink
import from dgcode ncrystaldev git: candidate for version 3.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tkittel committed Aug 22, 2024
1 parent b3a5aea commit 65fa539
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 13 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v3.9.4 2024-08-22
* Fix PhononDOSAnalyser (github issue #187).

v3.9.3 2024-08-20
* Fix NCrystal.cifutils plot labels with underscores in filenames.
* Fix MiniMC plotting.
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ endif()

cmake_policy( SET CMP0048 NEW )#Not sure if this is really needed

project( NCrystal VERSION 3.9.3 ${_project_metadata} )
project( NCrystal VERSION 3.9.4 ${_project_metadata} )

unset( _project_metadata )

Expand Down
2 changes: 1 addition & 1 deletion NCrystal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

#NB: Synchronize meta-data below with fields in setup.py+template_setup.py.in meta data:
__license__ = "Apache 2.0, http://www.apache.org/licenses/LICENSE-2.0"
__version__ = '3.9.3'
__version__ = '3.9.4'
__status__ = "Production"
__author__ = "NCrystal developers (Thomas Kittelmann, Xiao Xiao Cai)"
__copyright__ = "Copyright 2015-2024 %s"%__author__
Expand Down
10 changes: 6 additions & 4 deletions NCrystal/vdos.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,11 @@ def __init__(self, data, fmt = None ):
fmt = 'quantumespresso'

def _extract_from_anyvdos(x):
from .misc import AnyVDOS
v = AnyVDOS( x )
return v.label,v.egrid(),v.dos()

_srcname = None
if fmt == 'anyvdos':
doslist = [_extract_from_anyvdos(data)]
elif fmt == 'anyvdos_list':
Expand All @@ -215,11 +217,11 @@ def _extract_from_anyvdos(x):
from .misc import AnyTextData
td = AnyTextData( data )
doslist = _read_quantumespresso( td.content )
name = td.name
_srcname = td.name
elif fmt == 'raw':
import copy
doslist = copy.deepcopy( data )
name = 'raw data'
_srcname = 'raw data'
else:
raise NCBadInput('Invalid input format. Currently only "raw", "anyvdos", "anyvdos_list", and "quantumespresso" are supported.')

Expand Down Expand Up @@ -265,11 +267,11 @@ def _extract_from_anyvdos(x):
_dl.append( ( str(lbl), egrid, density ) )
doslist = _dl

self.__d = dict( doslist = doslist, srcname = name )
self.__d = dict( doslist = doslist, srcname = _srcname )

@property
def source_name( self ):
"Name of source data (such as the file name)."
"Name of source data (such as the file name). Might be absent (None)."
return self.__d['srcname']

@property
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.3
3.9.4
6 changes: 3 additions & 3 deletions ncrystal_core/include/NCrystal/NCVersion.hh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@

#define NCRYSTAL_VERSION_MAJOR 3
#define NCRYSTAL_VERSION_MINOR 9
#define NCRYSTAL_VERSION_PATCH 3
#define NCRYSTAL_VERSION 3009003 /* (1000000*MAJOR+1000*MINOR+PATCH) */
#define NCRYSTAL_VERSION_STR "3.9.3"
#define NCRYSTAL_VERSION_PATCH 4
#define NCRYSTAL_VERSION 3009004 /* (1000000*MAJOR+1000*MINOR+PATCH) */
#define NCRYSTAL_VERSION_STR "3.9.4"

#include "NCrystal/ncapi.h"
#include <stdexcept>
Expand Down
6 changes: 3 additions & 3 deletions ncrystal_core/include/NCrystal/ncrystal.h
Original file line number Diff line number Diff line change
Expand Up @@ -1201,9 +1201,9 @@ extern "C" {
#endif
#define NCRYSTAL_VERSION_MAJOR 3
#define NCRYSTAL_VERSION_MINOR 9
#define NCRYSTAL_VERSION_PATCH 3
#define NCRYSTAL_VERSION 3009003 /* (1000000*MAJOR+1000*MINOR+PATCH) */
#define NCRYSTAL_VERSION_STR "3.9.3"
#define NCRYSTAL_VERSION_PATCH 4
#define NCRYSTAL_VERSION 3009004 /* (1000000*MAJOR+1000*MINOR+PATCH) */
#define NCRYSTAL_VERSION_STR "3.9.4"
NCRYSTAL_API int ncrystal_version(void); /* returns NCRYSTAL_VERSION */
NCRYSTAL_API const char * ncrystal_version_str(void); /* returns NCRYSTAL_VERSION_STR */

Expand Down

0 comments on commit 65fa539

Please sign in to comment.