Built-in Models¶
(TD)DFT with Turbomole¶
Implementations of the interface between turbomole and mudslide. Turbomole provides electronic parameters such as energies, gradients, NAC coupling, etc to mudslide and mudslide performs molecular dynamics calculations
- class TMModel(states: Type[ndarray], run_turbomole_dir: str = '.', workdir_stem: str = 'run_turbomole', representation: str = 'adiabatic', reference: Optional[Any] = None, expert: bool = False, turbomole_modules: Optional[Dict] = None)¶
Bases:
ElectronicModel_
A class to handle the electronic model for excited state Turbomole calculations
- call_turbomole(outname='turbo.out') None ¶
Call Turbomole to run the calculation
- clone()¶
Create a copy of the electronics object that owns its own resources, including disk
Major difference from deepcopy is that clone should prepare any resources that are needed for the object to be used, for example, disk access, network access, and so on. deepcopy should only copy the object in memory, not acquire resources like disk space.
- compute(X, couplings: Optional[Any] = None, gradients: Optional[Any] = None, reference: Optional[Any] = None) None ¶
Calls Turbomole/Turboparse to generate electronic properties including gradients, couplings, energies. For this to work, this class needs to know where the “original” files/data sit, so that they can get properly passed to Turbomole. (__init__() can get these file locations.)
- setup_coords()¶
Setup the coordinates for the calculation
- class TurboControl(control_file='control', workdir=None)¶
Bases:
object
A class to handle the control file for turbomole
- add_point_charges(coords: Type[ndarray], charges: Type[ndarray])¶
Add point charges to the control file
point_charges data group has the structure: $point_charges nocheck list pcgrad <x> <y> <z> <q> …
- adg(dg, data, newline=False)¶
Convenience function to run add data group (adg) on a control
- check_turbomole_is_installed()¶
Check that turbomole is installed, raise exception if not
- cpc(dest)¶
Copy the control file and other files to a new directory
- get_masses(symbols)¶
Get the masses of the atoms in the system
- read_coords()¶
Read the coordinates from the control file
Returns:
- (symbols, coords) where symbols is a list of atomic symbols and
coords is a numpy array of shape (n_atoms * 3) with coordinates in angstroms
- read_hessian()¶
Projected Hessian has a structure of $hessian (projected) 1 1 0.000 0.000 0.000 0.000 0.000 1 2 0.000 0.000 0.000 0.000 0.000 2 1 0.000 0.000 0.000 0.000 0.000 …
- read_point_charge_gradients()¶
Read point charges and gradients from the control file
point charges in dg $point_charges gradients in dg $point_charge_gradients
Returns: (coords, charges, gradients) where coords is a numpy array of shape (nq, 3) with coordinates in Bohr
- run_single(module, stdout=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)¶
Run a single turbomole module
- sdg(dg, file=None, show_keyword=False, show_body=False, show_filename_only=False, discard_comments=True, quiet=False)¶
Convenience function to run show data group (sdg) on a control
- use_weight_derivatives(use=True)¶
Check if weight derivatives are used in the control file
- where_is_dg(dg, absolute_path=False)¶
Find which file a data group is in
Molecular Mechanics with OpenMM¶
- class OpenMM(pdb, ff, system)¶
Bases:
ElectronicModel_
OpenMM interface
- compute(position: Type[ndarray], couplings: Optional[Any] = None, gradients: Optional[Any] = None, reference: Optional[Any] = None)¶
Compute energy and forces
- openmm_is_installed()¶
Check if OpenMM is installed
Diabatic Scattering Models¶
Implementations of the one-dimensional two-state models Tully demonstrated FSSH on in Tully, J.C. <I>J. Chem. Phys.</I> 1990 <B>93</B> 1061.
- class LinearVibronic(representation: str = 'adiabatic', reference: Optional[Any] = None, mass: float = [243.6078782, 134.6412667, 99.93022402, 66.33593369, 3475.98736], E1: float = 8.5037, E2: float = 9.4523, lamb: float = 0.3289, r0sqrtw5mh: float = 4.35, om: float = array([0.1117, 0.2021, 0.2723, 0.4102]), k1: float = array([-0.0456, 0.0399, -0.2139, -0.0864]), k2: float = array([-0.0393, 0.0463, 0.2877, -0.1352]), An: float = array([1.4823, -0.2191, 0.0525, -0.0118]))¶
Bases:
DiabaticModel_
- class ShinMetiu(representation: str = 'adiabatic', reference: Optional[Any] = None, nstates: int = 3, L: float = 19.0, Rf: float = 5.0, Rl: float = 3.1, Rr: float = 4.0, mass: float = 1836.0, m_el: float = 1.0, nel: int = 128, box: Optional[Any] = None)¶
Bases:
AdiabaticModel_
- V(R: Type[ndarray]) Type[ndarray] ¶
\(V(x)\)
- dV(R: Type[ndarray]) Type[ndarray] ¶
\(\nabla V(x)\)
- class Subotnik2D(representation: str = 'adiabatic', reference: Optional[Any] = None, a: float = 0.2, b: float = 0.6, c: float = 0.015, d: float = 0.3, f: float = 0.05, g: float = 0.3, w: float = 2.0, mass: float = 2000.0)¶
Bases:
DiabaticModel_
- V(r: Type[ndarray]) Type[ndarray] ¶
\(V(x)\)
- dV(r: Type[ndarray]) Type[ndarray] ¶
\(\nabla V(x)\)
- class SubotnikModelS(representation: str = 'adiabatic', reference: Optional[Any] = None, a: float = 0.015, b: float = 1.0, c: float = 0.005, d: float = 0.5, xp: float = 7.0, mass: float = 2000.0)¶
Bases:
DiabaticModel_
- V(x: Type[ndarray]) Type[ndarray] ¶
\(V(x)\)
- dV(x: Type[ndarray]) Type[ndarray] ¶
\(\nabla V(x)\)
- class SubotnikModelX(representation: str = 'adiabatic', reference: Optional[Any] = None, a: float = 0.03, b: float = 1.6, c: float = 0.005, xp: float = 7.0, mass: float = 2000.0)¶
Bases:
DiabaticModel_
- V(x: Type[ndarray]) Type[ndarray] ¶
\(V(x)\)
- dV(x: Type[ndarray]) Type[ndarray] ¶
\(\nabla V(x)\)
- class SuperExchange(representation: str = 'adiabatic', reference: Optional[Any] = None, v11: float = 0.0, v22: float = 0.01, v33: float = 0.005, v12: float = 0.001, v23: float = 0.01, mass: float = 2000.0)¶
Bases:
DiabaticModel_
- V(x: Type[ndarray]) Type[ndarray] ¶
\(V(x)\)
- dV(x: Type[ndarray]) Type[ndarray] ¶
\(\nabla V(x)\)
- class TullyDualAvoidedCrossing(representation: str = 'adiabatic', reference: Optional[Any] = None, a: float = 0.1, b: float = 0.28, c: float = 0.015, d: float = 0.06, e: float = 0.05, mass: float = 2000.0)¶
Bases:
DiabaticModel_
Tunneling through a double avoided crossing used in Tully’s 1990 JCP
\[\begin{split}V_{11} &= 0 \\ V_{22} &= -A e^{-Bx^2} + E_0 \\ V_{12} &= V_{21} = C e^{-D x^2}\end{split}\]- V(X: Type[ndarray]) Type[ndarray] ¶
\(V(x)\)
- dV(x: Type[ndarray]) Type[ndarray] ¶
\(\nabla V(x)\)
- class TullyExtendedCouplingReflection(representation: str = 'adiabatic', reference: Optional[Any] = None, a: float = 0.0006, b: float = 0.1, c: float = 0.9, mass: float = 2000.0)¶
Bases:
DiabaticModel_
Model with extended coupling and the possibility of reflection. The most challenging of the models used in Tully’s 1990 JCP
\[\begin{split}V_{11} &= A \\ V_{22} &= -A \\ V_{12} &= \left\{ \begin{array}{cr} B e^{Cx} & x < 0 \\ B \left( 2 - e^{-Cx} \right) & x > 0 \end{array} \right.\end{split}\]- V(X: Type[ndarray]) Type[ndarray] ¶
\(V(x)\)
- dV(x: Type[ndarray]) Type[ndarray] ¶
\(\nabla V(x)\)
- class TullySimpleAvoidedCrossing(representation: str = 'adiabatic', reference: Optional[Any] = None, a: float = 0.01, b: float = 1.6, c: float = 0.005, d: float = 1.0, mass: float = 2000.0)¶
Bases:
DiabaticModel_
Tunneling through a single barrier model used in Tully’s 1990 JCP
\[\begin{split}V_{11} &= \left\{ \begin{array}{cr} A (1 - e^{Bx}) & x < 0 \\ -A (1 - e^{-Bx}) & x > 0 \end{array} \right. \\ V_{22} &= -V_{11} \\ V_{12} &= V_{21} = C e^{-D x^2}\end{split}\]- V(X: Type[ndarray]) Type[ndarray] ¶
\(V(x)\)
- dV(x: Type[ndarray]) Type[ndarray] ¶
\(\nabla V(x)\)