[AMBER] Sander python API problem (?)

From: Elisa Pieri <elisa.pieri90.gmail.com>
Date: Thu, 23 Feb 2017 16:05:15 +0100

Hi everybody,

I'm trying to use the python API of Sander to set up some kind of QM/MM. I
wrote this script:

import parmed as pmd
import sander

print('Loading prmtop and trajectory')
parm = pmd.load_file('state00.parm7', 'frame.nc')

print('Zero-ing out Lennard-Jones parameters')
pmd.tools.addLJType(parm, ':*', radius=1, epsilon=0).execute()

inp = sander.pme_input()
qm_inp = sander.QmInputOptions()
qm_inp.qmmask = ".83-97"
qm_inp.qmcut = 9.0

with sander.setup(parm, parm.coords, parm.box, inp, qm_inp):
    ene, frc = sander.energy_forces()

So, as you see, I have a NC file, which only contains ONE frame. Sadly,
when I run it, I get this:

Traceback (most recent call last):
  File "qmmm_sander.py", line 22, in <module>
    with sander.setup(parm, parm.coords, parm.box, inp, qm_inp):
AttributeError: 'AmberParm' object has no attribute 'coords'

Now..is this something related to the NC format? Should I use the RST7
format instead? And if the answer is yes, how do you transform NC into
RST7? I tried with cpptraj (with trajout, to be precise) with no success,
the file is not read by VMD.
Or..is the problem somewhere else?

Thanks!
Elisa
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Feb 23 2017 - 07:30:02 PST
Custom Search