Function-based API
easyxtb.calculate
Provides a simpler function-based calculation API.
The function-based API returns just the values of interest for a given geometry in a
quick and intuitive fashion, without the user having to worry about Calculation
objects.
easyxtb.calculate.energy
energy(input_geometry: Geometry, solvation: str | None = None, method: int | None = None, n_proc: int | None = None, options: dict | None = None) -> float
Calculate the energy in hartree of the given geometry.
Source code in easyxtb/calculate.py
easyxtb.calculate.optimize
optimize(input_geometry: Geometry, level: str | None = None, solvation: str | None = None, method: int | None = None, n_proc: int | None = None, options: dict | None = None) -> Geometry
Optimize the geometry, starting from the provided initial geometry, and return the optimized geometry.
Source code in easyxtb/calculate.py
easyxtb.calculate.frequencies
frequencies(input_geometry: Geometry, solvation: str | None = None, method: int | None = None, n_proc: int | None = None, options: dict | None = None) -> list[dict]
Calculate vibrational frequencies and return results as a list of dicts.
Source code in easyxtb/calculate.py
easyxtb.calculate.smartopt
smartopt(input_geometry: Geometry, level: str | None = None, solvation: str | None = None, method: int | None = None, n_proc: int | None = None, options: dict | None = None) -> Geometry
Optimize the geometry repeatedly until a minimum is reached.
If xtb is run with the ohess runtype (an optimization and subsequent frequency
calculation) and the program detects one or more imaginary frequencies in the
result, it distorts the optimized geometry away from the stationary point and
recommends to restart the calculation from that distorted geometry.
The smartopt function takes advantage of this and does that restart automatically,
and will continue to restart the optimizations until a minimum is reached.
Be aware that this could in theory get stuck in an endless loop if xtb never finds a minimum, though in practice it seems to only need at maximum a couple of iterations.
Source code in easyxtb/calculate.py
easyxtb.calculate.orbitals
orbitals(input_geometry: Geometry, solvation: str | None = None, method: int | None = None, n_proc: int | None = None, options: dict | None = None) -> str
Calculate molecular orbitals for given geometry.
Returns a string of the Molden-format output file, which contains principally the GTO and MO information.
Source code in easyxtb/calculate.py
easyxtb.calculate.conformers
conformers(input_geometry: Geometry, solvation: str | None = None, method: int | None = None, ewin: int | float = 6, hess: bool = False, n_proc: int | None = None, options: dict | None = None) -> list[dict]
Simulate a conformer ensemble and return set of conformer Geometries and energies.
The returned conformers are ordered from lowest to highest energy.
All conformers within
Source code in easyxtb/calculate.py
easyxtb.calculate.tautomerize
tautomerize(input_geometry: Geometry, solvation: str | None = None, method: int | None = None, n_proc: int | None = None, options: dict | None = None) -> list[dict]
Sample prototropic tautomers and return set of tautomer Geometries and energies.
The returned tautomers are ordered from lowest to highest energy.
Source code in easyxtb/calculate.py
easyxtb.calculate.protonate
protonate(input_geometry: Geometry, solvation: str | None = None, method: int | None = None, n_proc: int | None = None, options: dict | None = None) -> list[dict]
Screen possible protonation sites and return set of tautomer Geometries and energies.
The returned tautomers are ordered from lowest to highest energy.
Source code in easyxtb/calculate.py
easyxtb.calculate.deprotonate
deprotonate(input_geometry: Geometry, solvation: str | None = None, method: int | None = None, n_proc: int | None = None, options: dict | None = None) -> list[dict]
Screen possible deprotonation sites and return set of tautomer Geometries and energies.
The returned tautomers are ordered from lowest to highest energy.
Source code in easyxtb/calculate.py
easyxtb.calculate.solvate
solvate(solute_geometry: Geometry, solvent_geometry: Geometry, nsolv: int, method: int | None = None, n_proc: int | None = None, options: dict | None = None) -> Geometry
Grow a solvent shell around a solute for a total of nsolv solvent molecules.
Note that non-zero charge and spin on the solvent Geometry will not be passed to
CREST.