Skip to content

Commit

Permalink
box stabilisation
Browse files Browse the repository at this point in the history
  • Loading branch information
JLittlef committed May 29, 2024
1 parent 002e804 commit 3523efd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/openmmMD.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def setup_system(modeller, forcefield, solvmol: str, no_restraints: bool):
return system

def setup_simulation(modeller, system):
integrator = mm.LangevinMiddleIntegrator(300*kelvin, 1/picosecond, 0.0001*picoseconds)
integrator = mm.LangevinMiddleIntegrator(300*kelvin, 1/picosecond, 0.001*picoseconds)
simulation = app.Simulation(modeller.topology, system, integrator)
simulation.context.setPositions(modeller.positions)
return simulation
Expand All @@ -134,6 +134,7 @@ def energy_minimization(modeller):
def md_nvt(simulation, csvname: str, totalsteps: int, reprate: int, pdbname):
init_state = simulation.context.getState(getEnergy=True, getPositions=True)
init_pe = init_state.getPotentialEnergy().value_in_unit(kilocalories_per_mole)
simulation.context.setVelocitiesToTemperature(300*unit.kelvin)
simulation.reporters.append(app.PDBReporter(pdbname, reprate))
simulation.reporters.append(app.StateDataReporter(stdout, reprate, step=True, potentialEnergy=True, temperature=True, volume=True))
prepdf = {'Step':[], 'Potential Energy (kJ/mole)':[], 'Temperature (K)':[], 'Box Volume (nm^3)':[]}
Expand Down

0 comments on commit 3523efd

Please sign in to comment.