Skip to content

Commit

Permalink
Basic documentation for xtb support
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelRobidas committed Mar 21, 2022
1 parent 9f9f7ad commit 76baf6a
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 48 deletions.
49 changes: 43 additions & 6 deletions ccinput/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,18 @@ class CalcType(Enum):
ATOMIC_SYMBOL[el.number] = el.symbol
LOWERCASE_ATOMIC_SYMBOLS[el.symbol.lower()] = el.symbol

# The first synonym will be used as detailed name in the documentation
SYN_TYPES = {
CalcType.SP: ["sp", "singlepoint", "singlepointenergy", "energy", "scf"],
CalcType.SP: [
"Single-point Energy",
"sp",
"singlepoint",
"singlepointenergy",
"energy",
"scf",
],
CalcType.OPT: [
"Geometrical Optimisation",
"opt",
"optimize",
"optimise",
Expand All @@ -43,13 +52,15 @@ class CalcType(Enum):
"geomopt",
],
CalcType.CONSTR_OPT: [
"Constrained Optimisation",
"optconstr",
"constropt",
"optmod",
"constrainedoptimisation",
"constrainedoptimization",
],
CalcType.FREQ: [
"Frequency Calculation",
"freq",
"frequency",
"hess",
Expand All @@ -58,9 +69,24 @@ class CalcType(Enum):
"frequencycalculation",
"freqcalculation",
],
CalcType.TS: ["ts", "tsoptimisation", "tsoptimization", "optts", "tsopt"],
CalcType.NMR: ["nmr", "nmrprediction", "nmrcalculation", "nmrcalc", "calcnmr"],
CalcType.TS: [
"TS Optimisation",
"ts",
"tsoptimisation",
"tsoptimization",
"optts",
"tsopt",
],
CalcType.NMR: [
"NMR Calculation",
"nmr",
"nmrprediction",
"nmrcalculation",
"nmrcalc",
"calcnmr",
],
CalcType.UVVIS: [
"UV-Vis Calculation",
"uvvis",
"uvvisprediction",
"uvviscalculation",
Expand All @@ -69,17 +95,27 @@ class CalcType(Enum):
"tddft",
"absorbance",
],
CalcType.UVVIS_TDA: ["tda", "tdadft"],
CalcType.UVVIS_TDA: ["TDA UV-Vis Calculation", "tda", "tdadft"],
CalcType.MEP: [
"Minimum energy path",
"mep",
"minimumenergypath",
"minimalenergypath",
"neb",
"nudgedelasticband",
"reactionpath",
],
CalcType.MO: ["mo", "mocalc", "mocalculation", "molecularorbitals", "mos"],
CalcType.OPTFREQ: ["optfreq", "opt+freq"],
CalcType.MO: [
"MO Calculation",
"mo",
"mocalc",
"mocalculation",
"molecularorbitals",
"mos",
],
CalcType.OPTFREQ: ["Opt+Freq Calculation", "optfreq", "opt+freq"],
CalcType.CONF_SEARCH: [
"Conformational Search",
"conformersearch",
"confsearch",
"conformationalsearch",
Expand All @@ -88,6 +124,7 @@ class CalcType(Enum):
"conf",
],
CalcType.CONSTR_CONF_SEARCH: [
"Constrained Conformational Search",
"constrainedconformersearch",
"constrconfsearch",
"constrainedconformationalsearch",
Expand Down
17 changes: 14 additions & 3 deletions ccinput/documentation.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
def format_dict_str(d, name):
from ccinput.constants import SYN_TYPES


def format_dict_str(d, name, label2="Synonyms"):
arr_l = [len(name)]
for k, syns in d.items():
arr_l.append(len(k))
arr_l += [len(s) for s in syns]

ll = max(arr_l)

tab = """{} ========\n{:<{}} Synonyms\n{} ========\n""".format(
ll * "=", name, ll, ll * "="
tab = """{} ========\n{:<{}} {}\n{} ========\n""".format(
ll * "=", name, ll, label2, ll * "="
)

for k, syns in sorted(d.items(), key=lambda i: i[0]):
Expand All @@ -22,3 +25,11 @@ def format_dict_str(d, name):

def format_dict_enum(d, name):
return format_dict_str({k.name: v for k, v in d.items()}, name)


def format_calc_types():
return format_dict_str(
{j[0]: [str(i)] for i, j in SYN_TYPES.items()},
"Calculation type",
label2="Code",
)
73 changes: 38 additions & 35 deletions docs/source/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,46 +60,49 @@ Supported features

Below is a short summary of the different features that can be requested for the supported packages. Important features (*e.g.* a whole different calculation type) that are not mentioned can be assumed to not be supported. Minor features (*e.g.* additional printout) that are not mentioned may or may not be supported; refer to the :doc:`detailed usage<usage>` for more information.

=============================== ============ ===========
Calculation Type Gaussian 16 ORCA 5
=============================== ============ ===========
Essential calculations [1]_ yes yes
Common calculations [2]_ yes yes
Minimum energy path n.a. yes
NMR prediction yes yes
TD-DFT yes no
Molecular orbital visualisation no yes
=============================== ============ ===========


=============================== ============ ===========
=============================== ============ =========== =========
Calculation Type Gaussian 16 ORCA 5 xtb
=============================== ============ =========== =========
Essential calculations [1]_ yes yes yes
Common calculations [2]_ yes yes yes
Minimum energy path n.a. yes n.a.
NMR prediction yes yes n.a.
TD-DFT yes no n.a.
Molecular orbital visualisation no yes no
=============================== ============ =========== =========


=============================== ============ =========== =========
Level of theory Gaussian 16 ORCA 5
=============================== ============ ===========
Tight-binding methods no yes [3]_
Semi-empirical methods yes yes
Hartree-fock yes yes
Density Functional Theory yes yes
Grimme's "3c" methods n.a. yes
Møller-Plesset no no
Coupled Cluster n.a. no
=============================== ============ ===========


=============================== ============ ===========
Feature Gaussian 16 ORCA 5
=============================== ============ ===========
Implicit solvation yes yes
Choice of solvation radii set yes yes
Custom solvation radii yes yes
Custom basis sets yes yes
Density fitting yes no
Custom additional keywords yes yes
Dispersion corrections yes yes
=============================== ============ ===========
=============================== ============ =========== =========
Tight-binding methods no yes [3]_ yes
Semi-empirical methods yes yes n.a.
Hartree-fock yes yes n.a.
Density Functional Theory yes yes n.a.
Grimme's "3c" methods n.a. yes n.a.
Møller-Plesset no no n.a.
Coupled Cluster n.a. no n.a.
=============================== ============ =========== =========


=============================== ============ =========== =========
Feature Gaussian 16 ORCA 5 xtb
=============================== ============ =========== =========
Implicit solvation yes yes yes
Choice of solvation radii set yes yes n.a.
Custom solvation radii yes yes n.a.
Custom basis sets yes yes n.a.
Density fitting yes no n.a.
Custom additional keywords yes yes yes
Dispersion corrections yes yes yes [4]_
Counter-poise correction no no yes [4]_
=============================== ============ =========== =========


.. [1] Single-point energy calculation, geometrical optimisation, frequency calculation
.. [2] Transition state optimisation, constrained optimisation
.. [3] Requires the `xtb package <https://github.com/grimme-lab/xtb>`__; the supported methods are GFN2-xTB, GFN1-xTB, GFN0-xTB and GFN-FF
.. [4] Used by default
12 changes: 8 additions & 4 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The parameters not case sensitive and ``ccinput`` recognizes several synonyms fo
- DEF2TZVP
- def2tzvp

The accepted synonyms will be listed for each parameter. If you believe that a common or useful synonym is missing, feel free to send a pull request.
Spaces and symbols other than ``+`` and ``*`` will be ignored. The otherwise different synonyms will be listed for each parameter. If you believe that a common or useful synonym is missing, feel free to send a pull request.

Software
^^^^^^^^
Expand All @@ -61,9 +61,8 @@ Type
Type of calculation (*e.g.* single-point energy, geometrical optimization, transition state optimization...)

.. exec::
from ccinput.constants import INV_STR_TYPES
from ccinput.documentation import format_dict_enum
print(format_dict_enum(INV_STR_TYPES, "Calculation id"))
from ccinput.documentation import format_calc_types
print(format_calc_types())

|
Expand Down Expand Up @@ -173,6 +172,11 @@ Gaussian SMD
ORCA SMD

CPCM

xtb GBSA

ALPB

========== ========

Solvation radii
Expand Down

0 comments on commit 76baf6a

Please sign in to comment.