diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..156d3a6e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,41 @@ +# Changelog + +## Conventions used for this changelog + + - keep it concise but human readable + - keep the *UNRELEASED* section up to date with the `develop` branch + - create a new subsection for each release version + - each version should have the following information: + - a release date in the format `YYYY-MM-DD` + - a list of added new feature + - a list of changed functionnality of existing features + - a list of deprecated features (features that will be deleted in a future release) + - a list of removed feature (previously marked deprecated) + - a list of bug fixes + +---- + +## *UNRELEASED* (last updated: 2018-11-19) + +**Here we collect the list of *added*, *changed*, *deprecated*, *removed* and *fixed* features in preparation for the next release.** + +Start of large KKR repository holding *voronoi*, *KKRhost*, *KKRimp*, *KKRsusc*, and *PKKprime* with major refactoring of code structure. + + +### Added +- None + +### Changed +- kkr calculation retrieves Jij files + +### Deprecated +- KKRimporter calculation now also retrieves Jij files + +### Removed +- None + +### Fixed +- None + +---- + diff --git a/aiida_kkr/calculations/kkr.py b/aiida_kkr/calculations/kkr.py index e19f3103..51715935 100644 --- a/aiida_kkr/calculations/kkr.py +++ b/aiida_kkr/calculations/kkr.py @@ -30,7 +30,7 @@ __copyright__ = (u"Copyright (c), 2017, Forschungszentrum Jülich GmbH, " "IAS-1/PGI-1, Germany. All rights reserved.") __license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.6" +__version__ = "0.7" __contributors__ = ("Jens Broeder", "Philipp Rüßmann") @@ -93,6 +93,9 @@ def _init_internal_params(self): self._KKRFLEX_INTERCELL_REF = 'kkrflex_intercell_ref' self._KKRFLEX_INTERCELL_CMOMS = 'kkrflex_intercell_cmoms' self._ALL_KKRFLEX_FILES = [self._KKRFLEX_GREEN, self._KKRFLEX_TMAT, self._KKRFLEX_ATOMINFO, self._KKRFLEX_INTERCELL_REF, self._KKRFLEX_INTERCELL_CMOMS] + # Jij files + self._Jij_ATOM = 'Jij.atom%0.5i' + self._SHELLS_DAT = 'shells.dat' # template.product entry point defined in setup.json self._default_parser = 'kkr.kkrparser' @@ -539,6 +542,18 @@ def _prepare_for_submission(self, tempfolder, inputdict): add_files.append((self._QDOS_ATOM%(iatom+1, ispin+1)).replace(' ','0')) calcinfo.retrieve_list += add_files + # 4. Jij calculation + retrieve_Jij_files = False + if 'RUNOPT' in parameters.get_dict().keys(): + runopts = parameters.get_dict()['RUNOPT'] + if runopts is not None : + stripped_run_opts = [i.strip() for i in runopts] + if 'XCPL' in stripped_run_opts: + retrieve_Jij_files = True + if retrieve_Jij_files: + add_files = [self._SHELLS_DAT] + [self._Jij_ATOM%iatom for iatom in range(1,natom+1)] + print('adding files for Jij output', add_files) + calcinfo.retrieve_list += add_files codeinfo = CodeInfo() codeinfo.cmdline_params = [] diff --git a/aiida_kkr/calculations/kkrimporter.py b/aiida_kkr/calculations/kkrimporter.py index be3ec1fe..04716e15 100644 --- a/aiida_kkr/calculations/kkrimporter.py +++ b/aiida_kkr/calculations/kkrimporter.py @@ -25,7 +25,7 @@ __copyright__ = (u"Copyright (c), 2017, Forschungszentrum Jülich GmbH, " "IAS-1/PGI-1, Germany. All rights reserved.") __license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.1" +__version__ = "0.2" __contributors__ = ("Philipp Rüßmann") @@ -215,12 +215,20 @@ def _prepare_for_retrieval(self, open_transport): # Manually set the files that will be copied to the repository and that # the parser will extract the results from. This would normally be # performed in self._prepare_for_submission prior to submission. + + natom = 1000 # maximal number of atom-resolved files that are retrieved + # TODO take actual natom value (maybe extract from number of files that are there) self._set_attr('retrieve_list', - [self._DEFAULT_OUTPUT_FILE, self._NONCO_ANGLES_OUT, - self._OUTPUT_0_INIT, self._OUTPUT_000, self._OUTPUT_2, + [self._INPUT_FILE_NAME, # inputcard needed for parsing + self._DEFAULT_OUTPUT_FILE, # out_kkr, std shell output + self._NONCO_ANGLES_OUT, # nonco angles files + self._OUTPUT_0_INIT, self._OUTPUT_000, self._OUTPUT_2, # output files in new(er) style 'output.0','output.1a','output.1b','output.1c','output.2', # try to import old style output - self._OUT_TIMING_000, - self._OUT_POTENTIAL, self._SHAPEFUN]) # make sure to retrieve potential and shapefun as well + self._OUT_TIMING_000, # timing file + self._OUT_POTENTIAL, self._SHAPEFUN # make sure to retrieve potential and shapefun as well + # add Jij files etc for other run options + ] + [self._SHELLS_DAT] + [self._Jij_ATOM%iatom for iatom in range(1,natom+1)] + ) self._set_attr('retrieve_singlefile_list', []) # Make sure the calculation and input links are stored. diff --git a/aiida_kkr/tools/common_workfunctions.py b/aiida_kkr/tools/common_workfunctions.py index d3b19edf..6c5fceca 100644 --- a/aiida_kkr/tools/common_workfunctions.py +++ b/aiida_kkr/tools/common_workfunctions.py @@ -577,11 +577,16 @@ def structure_from_params(parameters): """ from aiida_kkr.tools.common_functions import get_aBohr2Ang from aiida.common.constants import elements as PeriodicTableElements + from aiida_kkr.tools.kkr_params import kkrparams from numpy import array - StructureData = DataFactory('structure') - is_complete = True + #check input + if not isinstance(parameters, kkrparams): + raise InputValidationError('input parameters needs to be a "kkrparams" instance!') + # initialize some stuff + StructureData = DataFactory('structure') + is_complete = True for icheck in ['', '', 'BRAVAIS', 'ALATBASIS']: if parameters.get_value(icheck) is None: is_complete = False @@ -625,13 +630,22 @@ def structure_from_params(parameters): else: pos_all = pos_all * alat * get_aBohr2Ang() # now positions are in Ang. units + # extract atom numbers zatom_all = parameters.get_value('') + # convert to list if input contains a single entry only + if type(zatom_all) != list: + zatom_all = [zatom_all] + pos_all = [pos_all] + + #extract weights and sites for CPA calculations if natyp==naez: weights = [1. for i in range(natyp)] sites = range(1,natyp+1) else: weights = parameters.get_value('') sites = parameters.get_value('') + + # fill structure from zatom, weights and sites information for isite in sites: pos = pos_all[sites.index(isite)] weight = weights[sites.index(isite)] diff --git a/aiida_kkr/tools/kkr_params.py b/aiida_kkr/tools/kkr_params.py index a1a8a177..01bc6cd5 100644 --- a/aiida_kkr/tools/kkr_params.py +++ b/aiida_kkr/tools/kkr_params.py @@ -16,7 +16,7 @@ def raw_input(msg): __copyright__ = (u"Copyright (c), 2017, Forschungszentrum Jülich GmbH," "IAS-1/PGI-1, Germany. All rights reserved.") __license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.5" +__version__ = "0.6" __contributors__ = u"Philipp Rüßmann" # This defines the default parameters for KKR used in the aiida plugin: @@ -425,7 +425,12 @@ def _create_keywords_dict(self, **kwargs): ('RUNOPT', [None, '%s%s%s%s%s%s%s%s', False, 'Running and test options: 8-character keywords in a row without spaces between them']), ('TESTOPT', [None, '%s%s%s%s%s%s%s%s\n%s%s%s%s%s%s%s%s', False, 'Running and test options: optional 8-character keywords in a row without spaces between them plus a secod row of the same.']), #file names - ('FILES', [None, '%s', False, 'Name of potential and shapefun file (list of two strings, empty string will set back to default of the one file that is supposed to be changed)']) + ('FILES', [None, '%s', False, 'Name of potential and shapefun file (list of two strings, empty string will set back to default of the one file that is supposed to be changed)']), + # special options + ('JIJRAD', [None, '%f', False, 'Radius in alat which defines the cutoff for calcultion of Jij pairs']), + ('JIJRADXY', [None, '%f', False, 'use a cylindical cluster in which Jij pairs are searched for']), + ('JIJSITEI', [None, '%i', False, 'allow for the selection of specific sites in i in the unit cell, which should be considered in the calculation (default: all sites)']), + ('JIJSITEJ', [None, '%i', False, 'allow for the selection of specific sites in j in the unit cell, which should be considered in the calculation (default: all sites)']) ]) for key in kwargs: diff --git a/setup.json b/setup.json index 92df89ce..439eb7f3 100644 --- a/setup.json +++ b/setup.json @@ -14,7 +14,7 @@ "Topic :: Scientific/Engineering :: Physics", "Natural Language :: English" ], - "version": "0.1.0", + "version": "0.1.2", "setup_requires": ["reentry"], "reentry_register": true, "install_requires": [