Dear all,
I have already used OpenMM for MD simulation using .psf files generated by VMD. However, this time I was going to use GROMACS output files (i.e., solvate-ionised-minimised-protein.gro and topology.top) files as the input of OpenMM. As soon as my simulation goes to the equiliberation phase, I kept getting an error "Particle coordinate is NaN". I have already read the Frequency Asked Questions under this topic but unfortunately was not able to fix the issue . I would appreciate any insights on this matter. for your reference I also write down the code:
from openmm import *
from openmm.app import *
from openmm.unit import *
print('Parsing the GROMACS file...')
gro = GromacsGroFile('solvate-ionised-minimised-protein.gro.gro')
print('Generating the topology...')
top = GromacsTopFile('topol.top', periodicBoxVectors=gro.getPeriodicBoxVectors(),
includeDir='/usr/local/gromacs/share/gromacs/top')
print('Creating a system...')
system = top.createSystem(nonbondedMethod=PME, nonbondedCutoff=1.2*nanometers,
constraints=HBonds, ewaldErrorTolerance=0.001, hydrogenMass=1.5*amu)
integrator = LangevinMiddleIntegrator(300.0*kelvin, 1/picoseconds, 0.004*picoseconds)
#Platform
platform = Platform.getPlatformByName('CUDA')
prop = dict(DeviceIndex='0', Precision='single')
simulation = Simulation(top.topology, system, integrator, platform, prop)
simulation.context.setPositions(gro.positions)
print('Performing energy minimization...')
simulation.minimizeEnergy(maxIterations=5000)
print('Equilibration in NVT...')
simulation.context.setVelocitiesToTemperature(300*kelvin)
simulation.step(5000)
print('NVT is done...')
print('production in NPT...')
system.addForce(MonteCarloBarostat(1.01325*bar, 300*kelvin, 25))
simulation.context.reinitialize(True)
simulation.step(5000)
I appreciate your help a lot. I can also attach the files I use for your convenience.
Best,
Melly
GROMACS file with OpenMM: Particle coordinate is NaN
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
Re: GROMACS file with OpenMM: Particle coordinate is NaN
Can you post your input files? I'll see if I can reproduce it.
Re: GROMACS file with OpenMM: Particle coordinate is NaN
Thank you Peter for your fast reply. Means a lot!
Re: GROMACS file with OpenMM: Particle coordinate is NaN
The files were not supported to attach. Therefore, here is the link to the files:
https://drive.google.com/drive/folders/ ... sp=sharing
https://drive.google.com/drive/folders/ ... sp=sharing