Skip to content

Commit 179a38b

Browse files
author
cheolhochoi
committed
Revert "Add external DFTB+ backend scaffolding"
This reverts commit a08ad13.
1 parent a08ad13 commit 179a38b

8 files changed

Lines changed: 3 additions & 455 deletions

File tree

examples/DFTB/H2O_DFTBPLUS_GRADIENT.inp

Lines changed: 0 additions & 21 deletions
This file was deleted.

pyoqp/oqp/library/dftbplus.py

Lines changed: 0 additions & 278 deletions
This file was deleted.

pyoqp/oqp/library/runfunc.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import oqp
44
import oqp.library
5-
from oqp.library.dftbplus import run_openqp_molecule
65
from oqp.library.single_point import (
76
SinglePoint, Gradient, Hessian, LastStep,
87
BasisOverlap, NACME, NAC
@@ -20,10 +19,6 @@
2019

2120

2221
def compute_energy(mol):
23-
if mol.config['input']['method'] == 'dftb':
24-
run_openqp_molecule(mol, gradient=False)
25-
return
26-
2722
# compute energy
2823
SinglePoint(mol).energy()
2924

@@ -51,10 +46,6 @@ def compute_scf_prop(mol):
5146

5247

5348
def compute_grad(mol):
54-
if mol.config['input']['method'] == 'dftb':
55-
run_openqp_molecule(mol, gradient=True)
56-
return
57-
5849
# compute energy
5950
SinglePoint(mol).energy()
6051

pyoqp/oqp/molecule/oqpdata.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ def path(strng):
5656
'system2': {'type': str, 'default': ''},
5757
'd4': {'type': bool, 'default': 'False'},
5858
},
59-
'dftb': {
60-
'executable': {'type': str, 'default': 'dftb+'},
61-
'sk_path': {'type': str, 'default': ''},
62-
'scc': {'type': bool, 'default': 'True'},
63-
'max_scc_iterations': {'type': int, 'default': '100'},
64-
'timeout': {'type': int, 'default': '300'},
65-
'keep_workdir': {'type': bool, 'default': 'False'},
66-
},
6759
'guess': {
6860
'type': {'type': string, 'default': 'huckel'},
6961
'file': {'type': str, 'default': ''},

pyoqp/oqp/utils/input_checker.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
NOT_AVAILABLE_RUNTYPES = {"soc", "neb"}
1818
ALL_RUNTYPES = SUPPORTED_RUNTYPES | NOT_AVAILABLE_RUNTYPES
1919

20-
METHODS = {"hf", "tdhf", "dftb"}
20+
METHODS = {"hf", "tdhf"}
2121
SCF_TYPES = {"rhf", "rohf", "uhf"}
2222
TDHF_TYPES = {"rpa", "tda", "sf", "mrsf", "umrsf"}
2323
GUESS_TYPES = {"huckel", "hcore", "json", "auto", "pyscf", "sad", "sap"}
@@ -37,7 +37,7 @@
3737

3838
WIKI_HELP = {
3939
"input.runtype": "Use energy, grad, hess, nac, nacme, optimize, meci, mecp, mep, ts, prop, or data. soc and neb are recognized but not implemented yet.",
40-
"input.method": "Use method=hf for HF/DFT, method=tdhf for TDHF/TDDFT/SF/MRSF, or method=dftb for the optional external DFTB+ backend.",
40+
"input.method": "Use method=hf for HF/DFT and method=tdhf for TDHF/TDDFT/SF/MRSF runs.",
4141
"input.system": "Set system to an XYZ file path or inline coordinates with one atom per indented line.",
4242
"input.basis": "Set basis to a basis name, a comma-separated per-atom list, or library with tagged atoms and [input] library mappings.",
4343
"scf.type": "RHF is for multiplicity 1 closed-shell references. SF/MRSF needs an open-shell reference, usually ROHF.",
@@ -251,9 +251,6 @@ def _check_system(config: dict[str, Any], report: CheckReport) -> None:
251251

252252

253253
def _check_basis(config: dict[str, Any], report: CheckReport) -> None:
254-
if _as_lower(_get(config, "input", "method", "hf")) == "dftb":
255-
return
256-
257254
basis = _get(config, "input", "basis", "")
258255
system = _get(config, "input", "system", "")
259256
library = _get(config, "input", "library", "")
@@ -1179,22 +1176,10 @@ def check_input_values(
11791176
"Unknown electronic structure method.",
11801177
value=method,
11811178
expected=", ".join(sorted(METHODS)),
1182-
action="Choose hf, tdhf, or dftb.",
1179+
action="Choose hf or tdhf.",
11831180
wiki=WIKI_HELP["input.method"],
11841181
)
11851182

1186-
runtype = _as_lower(_get(config, "input", "runtype", "energy"))
1187-
if method == "dftb" and runtype not in {"energy", "grad"}:
1188-
report.add(
1189-
"ERROR",
1190-
"input.runtype",
1191-
"DFTB+ backend currently supports runtype=energy or grad only.",
1192-
value=runtype,
1193-
expected="energy, grad",
1194-
action="Use runtype=energy or runtype=grad for method=dftb.",
1195-
wiki=WIKI_HELP["input.runtype"],
1196-
)
1197-
11981183
_check_system(config, report)
11991184
_check_basis(config, report)
12001185
_check_guess(config, report)

0 commit comments

Comments
 (0)