From 327e07e30930739cd8212f2636a31b0f847659b4 Mon Sep 17 00:00:00 2001 From: Nico Date: Thu, 30 Nov 2023 16:11:54 +0100 Subject: [PATCH] removed charge/spin from adf calculator --- docs/example/scf/scf.py | 9 +++++---- qmctorch/scf/calculator/adf.py | 8 +++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/example/scf/scf.py b/docs/example/scf/scf.py index ef612527..bba8df9f 100644 --- a/docs/example/scf/scf.py +++ b/docs/example/scf/scf.py @@ -2,9 +2,9 @@ # Select the SCF calculator calc = ['pyscf', # pyscf - 'adf', # adf 2019 - 'adf2019' # adf 2020+ - ][0] + 'adf', # adf 2020+ + 'adf2019' # adf 2019 + ][1] # select an appropriate basis basis = { @@ -17,7 +17,8 @@ mol = Molecule(atom='H 0 0 -0.69; H 0 0 0.69', calculator=calc, basis=basis, - unit='bohr') + unit='bohr', + redo_scf=True) diff --git a/qmctorch/scf/calculator/adf.py b/qmctorch/scf/calculator/adf.py index 0d9e3f31..91a0ec23 100644 --- a/qmctorch/scf/calculator/adf.py +++ b/qmctorch/scf/calculator/adf.py @@ -32,6 +32,12 @@ def __init__( # pylint: disable=too-many-arguments savefile, ) + if charge != 0: + raise ValueError("ADF calculator does not support charge yet, open an issue in the repo :)") + + if spin != 0: + raise ValueError("ADF calculator does not support spin polarization yet, open an issue in the repo :)") + # basis from the emma paper self.additional_basis_type = ["VB1", "VB2", "VB3", "CVB1", "CVB2", "CVB3"] @@ -128,7 +134,7 @@ def get_plams_settings(self): sett.input.adf.totalenergy = True # charge info - sett.input.charge = "%d %d" % (self.charge, self.spin) + # sett.input.adf.charge = "%d %d" % (self.charge, self.spin) # spin info sett.input.unrestricted = False