Re: [AMBER] parmed question regarding modifying Lennard-Jones parameters

From: Jason Swails <>
Date: Fri, 8 Jan 2016 06:50:18 -0500

On Fri, Jan 8, 2016 at 3:45 AM, InSuk Joung <> wrote:

> I am using prmed to load topology files and running simulations with
> openMM. However, I want to change Lennard-Jones parameters for some atoms
> (especially zero-radius hydrogens). In case of wild conformational search,
> these zero-radius hydrogens cause nasty problems due to electrostatic
> interactions.
> Before create openMM's system, I guess I need to modify them by giving tiny
> values to both epsilons and sigma.
> This is the part of my python script.
> prmtop = pmd.load_file('model.prmtop')
> # something for changing lennard-jones parameters
> system = prmtop.createSystem()
> So far, I tried to modify atom.epsilon and atom.sigma in prmtop.atoms, but
> it does not seem to work.

​Possibly because the information is not being flushed back to the raw data
arrays... That's a complication with the AmberParm class -- there are two
places where the data is held and it's difficult to keep them in-sync.

I know that I can use interactive parmed and modify the topology file. I
> just want to know if there is a possible way in script-level without
> modifying the topology file.

Anything in the interactive interpreter can be used at the script level.
So what you want to use is "changeLJSingleType", and you can use that
inside your script as follows:

import parmed as pmd

prmtop = pmd.load_file('model.prmtop'), '@%HO', rmin=0.8,
system = prmtop.createSystem() ...

If that doesn't work, let me know.

I hope everything's going well!

Jason M. Swails
Rutgers University
Postdoctoral Researcher
AMBER mailing list
Received on Fri Jan 08 2016 - 04:00:06 PST
Custom Search