Skip to content

Commit

Permalink
removed charge/spin from adf calculator
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoRenaud committed Nov 30, 2023
1 parent 0a08ee0 commit 327e07e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 5 additions & 4 deletions docs/example/scf/scf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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)



8 changes: 7 additions & 1 deletion qmctorch/scf/calculator/adf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 327e07e

Please sign in to comment.