m3flow_lammps¶
Provider for molecular-dynamics tasks via LAMMPS: energy minimization, NVT/NPT/NVE runs, soft push-off, and mechanical deformation — deck generation, log parsing, and validation.
m3flow_lammps.main
¶
m3flow-lammps: MD tasks via LAMMPS (deck generation, log parsing, validation).
Implements: energy_minimize, run_nvt, run_npt, run_nve, run_soft_pushoff, run_deform (tasks/lammps/*.yaml).
Conventions
- canonical quantities arrive as {value, unit} in canonical units (K, bar, fs); LAMMPS real units need atm for pressure (bar / 1.01325)
- only
units realandunits ljsystems are supported; anything else is rejected before a deck is written units ljsystems (CG) carry no physical calibration. Inputs use a fixed convention, not a mapping: 1 K == T = 1, 1 bar == P = 1 and 1 tau == 1000 fs (so the duration/timestep ratio, i.e. the step count, is exact). Outputs of lj runs are labeled as reduced units (*_ljthermo columns,tautime axes) and never as physical units.- thermo output is never normalized per atom (
thermo_modify norm no) so energy columns are extensive totals in every unit style - sampling metadata records the actual dump/thermo stride x timestep, not the requested interval (they differ when interval/dt is not integer)
- state chaining: every run ends with write_data (coeffs + velocities) and write_restart; the next deck re-reads them
Ctx
¶
Source code in providers/src/m3flow_lammps/main.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | |
pressure_lmp(name='pressure', default_bar=1.0)
¶
Pressure in the deck's unit style: atm (real) or reduced (lj, by the 1 bar == P* = 1 input convention).
Source code in providers/src/m3flow_lammps/main.py
time_lmp(fs)
¶
stride(name, default_fs)
¶
Integer step stride for an output interval. The actual interval (stride x dt) is what downstream analysis must use; a mismatch with the request is reported as a warning, never hidden.
Source code in providers/src/m3flow_lammps/main.py
deck_deform(ctx)
¶
Uniaxial constant-engineering-strain-rate deformation.
Strain is measured from the box (L - L0)/L0, so it is exact whatever the
unit style; atoms are remapped with the box (remap x, the default for
solid deformation — remap v is for SLLOD flows and would make the
thermostat fight the imposed velocity profile).