Implicit Solvent Parameters Issue

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Michael Kilgour
Posts: 7
Joined: Mon Mar 08, 2021 5:14 pm

Implicit Solvent Parameters Issue

Post by Michael Kilgour » Tue Jun 22, 2021 12:17 pm

Hi there,

I'm trying to do implicit solvent simulations of nucleotides, and I'm running into a problem. If I use, for example

Code: Select all

 forcefield = ForceField('amber10.xml', 'amber10_obc.xml')
I get the following error. Note that if I use explicit water models with amber10 or amber14, I get no such parameterization issue, so it's a bit puzzling.

Code: Select all

Building system...
Traceback (most recent call last):
  File "/home/mkilgour/miniconda3/envs/folding/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3437, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-2-52eac68b4e3f>", line 1, in <module>
    runfile('/mnt/c/Users/mikem/OneDrive/McGill_Simine/Aptamers/MD/implicitSolventTest.py', wdir='/mnt/c/Users/mikem/OneDrive/McGill_Simine/Aptamers/MD')
  File "/mnt/c/Program Files/JetBrains/PyCharm 2020.2.2/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
  File "/mnt/c/Program Files/JetBrains/PyCharm 2020.2.2/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/mnt/c/Users/mikem/OneDrive/McGill_Simine/Aptamers/MD/implicitSolventTest.py", line 42, in <module>
    system = forcefield.createSystem(topology, nonbondedMethod=nonbondedMethod)#,implicitSolvent=OBC1,implicitSolventSaltConc=0.1*moles/liter)
  File "/home/mkilgour/miniconda3/envs/folding/lib/python3.8/site-packages/simtk/openmm/app/forcefield.py", line 1330, in createSystem
    force.createForce(sys, data, nonbondedMethod, nonbondedCutoff, args)
  File "/home/mkilgour/miniconda3/envs/folding/lib/python3.8/site-packages/simtk/openmm/app/forcefield.py", line 2684, in createForce
    values = self.params.getAtomParameters(atom, data)
  File "/home/mkilgour/miniconda3/envs/folding/lib/python3.8/site-packages/simtk/openmm/app/forcefield.py", line 929, in getAtomParameters
    raise ValueError('%s: No parameters defined for atom type %s' % (self.forceName, t))
ValueError: GBSAOBCForce: No parameters defined for atom type 1516
Beyond this, I would really like to be able to run an implicit solvent model where I could modulate the ionic strength. I'm a bit ignorant here, but it looks like there is a way to do this using createSystem from AMBER files - though I'm starting from a plain .pdb. So I'm not sure if there's another way to get at that functionality.

See below my full python script, for reference (based on openmm-setup).

Code: Select all

pdb = PDBFile('../lightdock/repStructure.pdb')
forcefield = ForceField('amber10.xml', 'amber10_obc.xml')

# System Configuration

nonbondedMethod = CutoffNonPeriodic
nonbondedCutoff = 2.0*nanometers
#constraints = HBonds
#rigidWater = True
constraintTolerance = 0.000001
hydrogenMass = 1.5*amu

# Integration Options

dt = 0.004*picoseconds
temperature = 300*kelvin
friction = 1.0/picosecond #91 for kinetics

# Simulation Options

steps = 10000
equilibrationSteps = 1000
platform = Platform.getPlatformByName('CPU')
dcdReporter = DCDReporter('trajectory.dcd', 10000)
checkpointReporter = CheckpointReporter('checkpoint.chk', 10000)

# Prepare the Simulation

print('Building system...')
topology = pdb.topology
positions = pdb.positions
system = forcefield.createSystem(topology, nonbondedMethod=nonbondedMethod, hydrogenMass=hydrogenMass)
integrator = LangevinMiddleIntegrator(temperature, friction, dt)
integrator.setConstraintTolerance(constraintTolerance)
simulation = Simulation(topology, system, integrator, platform)
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(checkpointReporter)
simulation.currentStep = 0
simulation.step(steps)

POST REPLY