Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippRue committed Aug 22, 2018
2 parents fc411a8 + a42da60 commit fe7f39a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 56 deletions.
5 changes: 4 additions & 1 deletion aiida_kkr/calculations/kkr.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
vca_check)
from aiida_kkr.tools.common_functions import get_alat_from_bravais, get_Ang2aBohr
from aiida_kkr.tools.tools_kkrimp import make_scoef
from aiida_kkr.tools.kkr_params import __kkr_default_params__

#define aiida structures from DataFactory of aiida
RemoteData = DataFactory('remote')
Expand Down Expand Up @@ -236,9 +237,11 @@ def _prepare_for_submission(self, tempfolder, inputdict):
if not value is None:
if key in self._do_never_modify:
oldvalue = parent_inp_dict[key]
if oldvalue is None and key in __kkr_default_params__:
oldvalue = __kkr_default_params__.get(key)
if value != oldvalue:
self.logger.error("You are trying to set keyword {} = {} but this is not allowed since the structure would be modified. Please use a suitable workfunction instead.".format(key, value))
raise InputValidationError("You are trying to modify a keyword that is not allowed to be changed!")
raise InputValidationError("You are trying to modify a keyword that is not allowed to be changed! (key={}, oldvalue={}, newvalue={})".format(key, oldvalue, value))


#TODO check for remote folder (starting from folder data not implemented yet)
Expand Down
6 changes: 0 additions & 6 deletions aiida_kkr/tools/common_workfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,6 @@ def generate_inputcard_from_structure(parameters, structure, input_filename, par
else:
zatom_tmp = 0.0
if vca_structure and ikind>0 and not isvoronoi:
print(site)
print(ikind)
print(zatom_tmp)
print(wght)
print(zatom)
print(wght_last)
# for VCA case take weighted average (only for KKR code, voronoi code uses zatom of first site for dummy calculation)
zatom = zatom*wght_last + zatom_tmp*wght
# also reset weight to 1
Expand Down
5 changes: 3 additions & 2 deletions aiida_kkr/tools/kkr_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def raw_input(msg):
# This defines the default parameters for KKR used in the aiida plugin:
__kkr_default_params__ = {"LMAX": 3, # lmax-cutoff
"INS": 1, # use shape corrections (full potential)
"KSHAPE": 2, # basically the same information as INS (KSHAPE=2*INS should always hold!)
"NSPIN": 2, # spin-polarized calculation (but by default not automatically initialized with external field)
"RMAX": 10., # Madelung sum real-space cutoff
"GMAX": 100., # Madelung sum reciprocal-space cutoff
Expand Down Expand Up @@ -180,7 +181,7 @@ def _get_type_from_string(self, fmtstr):
keytype = str
else:
print('Error: type of keyvalue not found:', fmtstr)
raise TypeError
raise TypeError('Type not found for format string: {}'.format(fmtstr))
return keytype


Expand Down Expand Up @@ -243,7 +244,7 @@ def _check_valuetype(self, key):
elif valtype != cmptypes and tmpval is not None:
success = False
print('Error: type of value does not match expected type for ', key, self.values[key], cmptypes)
raise TypeError
raise TypeError('type of value does not match expected type for key={}; value={}; expected type={}'.format(key, self.values[key], cmptypes))

if changed_type_automatically:
print('Warning: filling value of "%s" with integer but expects float. Converting automatically and continue'%key)
Expand Down
45 changes: 0 additions & 45 deletions docs/source/examples/tmp

This file was deleted.

2 changes: 1 addition & 1 deletion setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"setup_requires": ["reentry"],
"reentry_register": true,
"install_requires": [
"aiida-core >= 0.9",
"aiida-core < 0.12",
"pytest-cov"
],
"entry_points": {
Expand Down
2 changes: 1 addition & 1 deletion setup_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


# for support of the xml files and parsers
aiida>=0.9.0
aiida<0.12

# for utilities
#ase
Expand Down

0 comments on commit fe7f39a

Please sign in to comment.