Skip to content

Commit 81a4bb8

Browse files
author
Vishikh Athavale
committed
document molecular dynamics
1 parent a5ade15 commit 81a4bb8

File tree

1 file changed

+144
-0
lines changed

1 file changed

+144
-0
lines changed

docs/source/excited_bomd.rst

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
.. _excited_state_dynamics:
2+
3+
Excited-State Molecular Dynamics (Adiabatic)
4+
============================================
5+
6+
Overview
7+
--------
8+
9+
PYSEQM supports **adiabatic excited-state molecular dynamics** on a chosen
10+
electronic excited state.
11+
This means the nuclei move on the potential energy surface of **one** selected
12+
excited state (CIS or RPA/TDHF), while the electronic wavefunction for that
13+
state is recalculated self-consistently at each step.
14+
15+
.. important::
16+
17+
This is **not** nonadiabatic dynamics.
18+
Transitions between states are *not* included. The trajectory stays on one
19+
chosen excited surface throughout the simulation.
20+
21+
Supported engines
22+
-----------------
23+
24+
All existing MD drivers support adiabatic excited-state dynamics:
25+
26+
- ``Molecular_Dynamics_Basic`` — standard BOMD
27+
- ``Molecular_Dynamics_Langevin`` — BOMD with thermostat
28+
- ``XL_BOMD`` — extended-Lagrangian excited-state MD
29+
30+
The **input structure, outputs, and checkpointing** remain exactly the same as
31+
for ground-state BOMD.
32+
You only need to add a few extra keywords to your input dictionaries to choose
33+
the active excited state.
34+
35+
Setting up excited-state BOMD
36+
-----------------------------
37+
38+
Excited-state BOMD uses the same ``Molecular_Dynamics_Basic`` class as
39+
ground-state BOMD.
40+
The only difference is the **extra keys** you add to ``seqm_parameters``.
41+
42+
.. code-block:: python
43+
44+
from seqm.MolecularDynamics import Molecular_Dynamics_Basic
45+
46+
seqm_parameters = {
47+
'method': 'AM1',
48+
'scf_eps': 1.0e-7, # SCF convergence
49+
'scf_converger': [1],
50+
'excited_states': {'n_states': 5}, # number of excited states to compute
51+
'active_state': 2, # index of the excited state to follow
52+
}
53+
54+
output = {
55+
'prefix': './runs/h2co_es',
56+
'print every': 1,
57+
'xyz': 1,
58+
'checkpoint every': 100,
59+
'h5': {'data': 10, 'coordinates': 10, 'velocities': 10, 'forces': 10},
60+
}
61+
62+
md = Molecular_Dynamics_Basic(
63+
seqm_parameters=seqm_parameters,
64+
Temp=300.0, timestep=0.5, output=output
65+
).to(device)
66+
67+
_ = md.run(molecule, steps=1000)
68+
69+
Required keys in ``seqm_parameters``:
70+
71+
- **``'excited_states'``**
72+
Dictionary specifying excited states to compute:
73+
``'n_states'`` must be **at least two greater than** the chosen ``'active_state'``.
74+
This ensures accurate evaluation of the excited wavefunction and gradients.
75+
76+
- **``'active_state'``**
77+
Integer (≥ 1) selecting which excited state to run on.
78+
``0`` always corresponds to the ground state.
79+
80+
- All other SCF keys (``method``, ``scf_eps``, etc.) work as in ground-state BOMD.
81+
82+
Langevin thermostats
83+
~~~~~~~~~~~~~~~~~~~~
84+
85+
Excited-state dynamics also support the **Langevin** thermostat:
86+
use the same ``Molecular_Dynamics_Langevin`` driver with the
87+
same ``seqm_parameters`` (including ``excited_states`` and ``active_state``)
88+
and specify a damping constant ``damp`` (fs).
89+
90+
.. code-block:: python
91+
92+
md_langevin = Molecular_Dynamics_Langevin(
93+
damp=100.0,
94+
seqm_parameters=seqm_parameters,
95+
Temp=300.0,
96+
timestep=0.5,
97+
output=output
98+
).to(device)
99+
100+
_ = md_langevin.run(molecule, steps=2000)
101+
102+
Setting up excited-state XL-BOMD
103+
--------------------------------
104+
105+
Extended-Lagrangian excited-state MD runs exactly like the ground-state
106+
XL-BOMD, but you can additionally provide relaxed convergence settings for both
107+
the SCF and excited-state solvers.
108+
109+
.. code-block:: python
110+
111+
from seqm.MolecularDynamics import XL_BOMD, KSA_XL_BOMD
112+
113+
xl_bomd_params = {
114+
'k': 6, # dissipative force coefficient
115+
'scf_eps': 5e-4, # relaxed SCF convergence (default)
116+
'es_eps': 5e-3, # relaxed excited-state convergence (default)
117+
}
118+
119+
seqm_parameters = {
120+
'method': 'AM1',
121+
'excited_states': {'n_states': 5},
122+
'active_state': 2,
123+
}
124+
125+
md_xl = XL_BOMD(
126+
xl_bomd_params=xl_bomd_params,
127+
seqm_parameters=seqm_parameters,
128+
Temp=400.0,
129+
timestep=0.4,
130+
output=output
131+
).to(device)
132+
133+
_ = md_xl.run(molecule, steps=5000)
134+
135+
Notes for XL-BOMD:
136+
137+
- ``scf_eps`` and ``es_eps`` in ``xl_bomd_params`` control the convergence
138+
thresholds for SCF and excited-state solvers during each time step.
139+
By default:
140+
- ``scf_eps = 5 × 10⁻⁴``
141+
- ``es_eps = 5 × 10⁻³``
142+
- These relaxed thresholds typically maintain energy conservation
143+
while greatly reducing cost.
144+
- You can override them if tighter convergence is desired.

0 commit comments

Comments
 (0)