Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions censo
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import sys
import os

sys.path.insert(0, f"{os.path.join(os.path.split(__file__)[0], 'src')}")

from censo.cli.interface import entry_point

sys.exit(entry_point())
if __name__ == "__main__":
sys.path.insert(0, f"{os.path.join(os.path.split(__file__)[0], 'src')}")
sys.exit(entry_point())
95 changes: 85 additions & 10 deletions src/censo/assets/dfa.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@
"pbeh-3c": {
"tm": "pbeh-3c",
"orca": "pbeh-3c",
"psi4": "pbeh-3c",
"disp": "composite",
"type": "composite_hybrid"
},
"b97-3c": {
"tm": "b97-3c",
"orca": "b97-3c",
"psi4": "b97-3c",
"disp": "composite",
"type": "composite_gga"
},
"r2scan-3c": {
"tm": "r2scan-3c",
"orca": "r2scan-3c",
"psi4": "r2scan-3c",
"disp": "composite",
"type": "composite_mgga"
},
Expand All @@ -38,30 +41,70 @@
"r2scan-d4": {
"tm": "r2scan",
"orca": "r2scan",
"psi4": "r2scan-d4",
"disp": "d4",
"type": "mgga"
},
"pbe-novdw": { "tm": "pbe", "orca": "pbe", "disp": "novdw", "type": "gga" },
"pbe-d3": { "tm": "pbe", "orca": "pbe", "disp": "d3bj", "type": "gga" },
"pbe-d3": {
"tm": "pbe",
"orca": "pbe",
"psi4": "pbe-d3",
"disp": "d3bj",
"type": "gga"
},
"pbe-d3(0)": { "tm": "pbe", "orca": "pbe", "disp": "d3(0)", "type": "gga" },
"pbe-d4": { "tm": "pbe", "orca": "pbe", "disp": "d4", "type": "gga" },
"pbe-nl": { "tm": "pbe", "disp": "nl", "type": "gga" },
"bp86": { "tm": "b-p", "disp": "novdw", "type": "gga" },
"pbe-d4": {
"tm": "pbe",
"orca": "pbe",
"psi4": "pbe-d4",
"disp": "d4",
"type": "gga"
},
"pbe-nl": {
"tm": "pbe",
"psi4": "pbe-nl",
"disp": "nl",
"type": "gga"
},
"bp86": {
"tm": "b-p",
"psi4": "bp86",
"disp": "novdw",
"type": "gga"
},
"tpss-novdw": {
"tm": "tpss",
"orca": "tpss",
"disp": "novdw",
"type": "mgga"
},
"tpss-d3": { "tm": "tpss", "orca": "tpss", "disp": "d3bj", "type": "mgga" },
"tpss-d3": {
"tm": "tpss",
"orca": "tpss",
"psi4": "tpss-d3",
"disp": "d3bj",
"type": "mgga"
},
"tpss-d3(0)": {
"tm": "tpss",
"orca": "tpss",
"disp": "d3(0)",
"type": "mgga"
},
"tpss-d4": { "tm": "tpss", "orca": "tpss", "disp": "d4", "type": "mgga" },
"tpss-nl": { "tm": "tpss", "disp": "nl", "type": "mgga" },
"tpss-d4": {
"tm": "tpss",
"orca": "tpss",
"psi4": "tpss-d4",
"disp": "d4",
"type": "mgga"
},
"tpss-nl": {
"tm": "tpss",
"psi4": "tpss-nl",
"disp": "nl",
"type": "mgga"
},
"revtpss-novdw": {
"tm": "revtpss",
"orca": "revTPSS",
Expand All @@ -73,13 +116,23 @@
"disp": "novdw",
"type": "global_hybrid"
},
"tpssh-d3": { "orca": "tpssh", "disp": "d3", "type": "global_hybrid" },
"tpssh-d3": {
"orca": "tpssh",
"psi4": "tpssh-d3",
"disp": "d3",
"type": "global_hybrid"
},
"tpssh-d3(0)": {
"orca": "tpssh",
"disp": "d3(0)",
"type": "global_hybrid"
},
"tpssh-d4": { "orca": "tpssh", "disp": "d4", "type": "global_hybrid" },
"tpssh-d4": {
"orca": "tpssh",
"psi4": "tpssh-d4",
"disp": "d4",
"type": "global_hybrid"
},
"b97-d3": {
"tm": "b97-d",
"orca": "b97-d3",
Expand All @@ -98,6 +151,7 @@
"pbe0-d3": {
"tm": "pbe0",
"orca": "pbe0",
"psi4": "pbe0-d3",
"disp": "d3bj",
"type": "global_hybrid"
},
Expand All @@ -110,10 +164,16 @@
"pbe0-d4": {
"tm": "pbe0",
"orca": "pbe0",
"psi4": "pbe0-d4",
"disp": "d4",
"type": "global_hybrid"
},
"pbe0-nl": { "tm": "pbe0", "disp": "nl", "type": "global_hybrid" },
"pbe0-nl": {
"tm": "pbe0",
"psi4": "pbe0-nl",
"disp": "nl",
"type": "global_hybrid"
},
"pw6b95-novdw": {
"tm": "pw6b95",
"orca": "pw6b95",
Expand All @@ -123,6 +183,7 @@
"pw6b95-d3": {
"tm": "pw6b95",
"orca": "pw6b95",
"psi4": "pw6b95-d3",
"disp": "d3bj",
"type": "global_hybrid"
},
Expand All @@ -135,6 +196,7 @@
"pw6b95-d4": {
"tm": "pw6b95",
"orca": "pw6b95",
"psi4": "pw6b95-d4",
"disp": "d4",
"type": "global_hybrid"
},
Expand All @@ -147,6 +209,7 @@
"b3lyp-d3": {
"tm": "b3-lyp",
"orca": "b3lyp",
"psi4": "b3lyp-d3",
"disp": "d3bj",
"type": "global_hybrid"
},
Expand All @@ -159,39 +222,46 @@
"b3lyp-d4": {
"tm": "b3-lyp",
"orca": "b3lyp",
"psi4": "b3lyp-d4",
"disp": "d4",
"type": "global_hybrid"
},
"b3lyp-nl": {
"tm": "b3-lyp",
"orca": "b3lyp",
"psi4": "b3lyp-nl",
"disp": "nl",
"type": "global_hybrid"
},
"wb97x-v": {
"tm": "wb97x-v",
"orca": "wb97x-v",
"psi4": "wb97x-v",
"disp": "included",
"type": "rs_hybrid"
},
"wb97x-d3": {
"orca": "wb97x-d3",
"psi4": "wb97x-d3",
"disp": "included",
"type": "rs_hybrid"
},
"wb97x-d3bj": {
"orca": "wb97x-d3bj",
"psi4": "wb97x-d3bj",
"disp": "included",
"type": "rs_hybrid"
},
"wb97x-d4": {
"orca": "wb97x-d4",
"psi4": "wb97x-d4",
"disp": "included",
"type": "rs_hybrid"
},
"wb97m-v": {
"orca": "wb97m-v",
"tm": "wb97m-v",
"psi4": "wb97m-v",
"disp": "included",
"type": "rs_hybrid"
},
Expand Down Expand Up @@ -219,5 +289,10 @@
"orca": "dsd-pbep86",
"disp": "d3bj",
"type": "double"
},
"generic": {
"generic": "generic",
"disp": "generic",
"type": "generic"
}
}
2 changes: 1 addition & 1 deletion src/censo/config/parts/rot.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class RotConfig(BasePartConfig):
"""Config class for optical rotation calculations (gas-phase only)."""

prog: Literal[QmProg.TM] = QmProg.TM
prog: Literal[QmProg.TM] | Literal[QmProg.GENERIC] = QmProg.TM
"""Program that should be used for calculations."""

func: str = "pbe-d4"
Expand Down
2 changes: 1 addition & 1 deletion src/censo/config/parts/uvvis.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class UVVisConfig(BasePartConfig):
"""Config class for UVVis"""

prog: Literal[QmProg.ORCA] = QmProg.ORCA
prog: Literal[QmProg.ORCA] | Literal[QmProg.GENERIC] = QmProg.ORCA
"""Program that should be used for calculations."""

func: str = "wb97x-d4"
Expand Down
18 changes: 18 additions & 0 deletions src/censo/config/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,18 @@ class PathsConfig(BaseModel):
_orcaversion: str = PrivateAttr("")
"""ORCA version string. Should be extracted from somewhere."""

psi4: str = Field("")
"""Absolute path to the psi4 binary directory."""

tm: str = Field("")
"""Absolute path to the turbomole binary directory."""

xtb: str = Field("")
"""Absolute path to the xtb binary."""

generic: str = Field("")
"""Absolute path to the generic binary."""

cosmotherm: str = Field("")
"""Absolute path to the cosmotherm binary."""

Expand Down Expand Up @@ -76,6 +82,18 @@ def validate_orca(cls, value: str):
raise ValueError(f"orca executable not found at {value}.")
return value

@field_validator("psi4")
def validate_psi4(cls, value: str):
"""
Validate the psi4 executable path.

:param value: The path to validate.
:return: The validated path.
"""
if not Path(value).is_file():
raise ValueError(f"psi4 executable not found at {value}.")
return value

@field_validator("tm")
def validate_turbomole(cls, value: str):
"""
Expand Down
2 changes: 1 addition & 1 deletion src/censo/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def execute[
)
else:
results[meta.conf_name] = result
if prog in QmProg:
if (prog in QmProg) and (prog is not QmProg.PSI4): # TODO: implement mo for psi4
conf.mo_paths[prog].append(result.mo_path)
except CancelledError:
logger.debug("Future cancelled.")
Expand Down
3 changes: 3 additions & 0 deletions src/censo/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class Prog(str, Enum):
"""

ORCA = "orca"
PSI4 = "psi4"
TM = "tm"
XTB = "xtb"
GENERIC = "generic"
Expand All @@ -110,7 +111,9 @@ class QmProg(str, Enum):
"""

ORCA = Prog.ORCA.value
PSI4 = Prog.PSI4.value
TM = Prog.TM.value
GENERIC = Prog.GENERIC.value


class GridLevel(str, Enum):
Expand Down
3 changes: 2 additions & 1 deletion src/censo/processing/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from .processor import GenericProc
from .qm_processor import QmProc
from .orca_processor import OrcaProc
from .psi4_processor import Psi4Proc
from .tm_processor import TmProc
from .xtb_processor import XtbProc
from .job import JobContext

__all__ = ["GenericProc", "XtbProc", "QmProc", "OrcaProc", "TmProc", "JobContext"]
__all__ = ["GenericProc", "XtbProc", "QmProc", "OrcaProc", "Psi4Proc", "TmProc", "JobContext"]
Loading
Loading