Skip to content

Commit e820d74

Browse files
committed
Explicitly restrict the possible type of esolver_type to ksdft
1 parent 4ecd327 commit e820d74

File tree

1 file changed

+13
-0
lines changed
  • python/ase-plugin/abacuslite

1 file changed

+13
-0
lines changed

python/ase-plugin/abacuslite/core.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,19 @@ def write_input(self,
274274
_ = file_safe_backup(dst)
275275
# remove possible key-value pairs whose value is None
276276
parameters = {k: v for k, v in parameters.items() if v is not None}
277+
278+
# FIXME: only support the ksdft esolver_type presently
279+
if parameters.get('esolver_type', 'ksdft') != 'ksdft':
280+
raise NotImplementedError(
281+
'ABACUS Lite only supports the ksdft esolver_type presently, '
282+
'which means the ABACUS should always be used as a DFT '
283+
'calculator. For other forcefields that ABACUS supports '
284+
'such as the LJ, DP, etc., please either use the ABACUS '
285+
'directly, or the implementation of interfaces to ASE '
286+
'directly.'
287+
)
288+
289+
# write the INPUT file to the target directory
277290
_ = write_input(parameters, dst)
278291

279292
def execute(self,

0 commit comments

Comments
 (0)