Page 1 of 1

Default Minimization steps

Posted: Sun Dec 27, 2020 6:25 am
by sawstory
Hi
For sake of publication we need some info, what is the number of minimization steps and other details if present about this line
simulation.minimizeEnergy()
I got this line by using openmm-setup, as a part for MD simulation

# System Configuration

nonbondedMethod = CutoffNonPeriodic
nonbondedCutoff = 1.0*nanometers
constraints = HBonds
rigidWater = True
constraintTolerance = 0.000001

# Integration Options

dt = 0.002*picoseconds
temperature = 310*kelvin
friction = 1.0/picosecond

# Simulation Options

steps = 100000000
equilibrationSteps = 1000000
platform = Platform.getPlatformByName('CUDA')
properties = {'CudaPrecision': 'single', 'CudaDeviceIndex': '2'}
dcdReporter = DCDReporter('trajectory.dcd', 100000)
dataReporter = StateDataReporter('log.txt', 10000, totalSteps=steps,
step=True, time=True, speed=True, progress=True, elapsedTime=True, remainingTime=True, potentialEnergy=True, kineticEnergy=True, totalEnergy=True, temperature=True, volume=True, density=True, separator='\t')

# Prepare the Simulation

print('Building system...')
topology = psf.topology
positions = crd.positions
system = psf.createSystem(params, nonbondedMethod=nonbondedMethod, nonbondedCutoff=nonbondedCutoff,
constraints=constraints, rigidWater=rigidWater)
integrator = LangevinIntegrator(temperature, friction, dt)
integrator.setConstraintTolerance(constraintTolerance)
simulation = Simulation(topology, system, integrator, platform, properties)
simulation.context.setPositions(positions)

# Minimize and Equilibrate

print('Performing energy minimization...')
simulation.minimizeEnergy()
print('Equilibrating...')
simulation.context.setVelocitiesToTemperature(temperature)
simulation.step(equilibrationSteps)

# Simulate

print('Simulating...')
simulation.reporters.append(dcdReporter)
simulation.reporters.append(dataReporter)
simulation.currentStep = 0
simulation.step(steps)

All the best
Omar

Re: Default Minimization steps

Posted: Sun Dec 27, 2020 11:05 am
by peastman
See the API docs: http://docs.openmm.org/latest/api-pytho ... mizeEnergy. And there's a bit more detail at http://docs.openmm.org/latest/api-pytho ... yMinimizer.

There are two arguments you can specify. One sets an upper limit on the number of steps, which defaults to no limit. The other sets a tolerance for how small the forces have to get. It defaults to 10 kJ/mol/nm.