[AMBER] Armed API Syntax Question

From: Matthew Guberman-Pfeffer via AMBER <amber.ambermd.org>
Date: Sat, 16 Dec 2023 12:44:09 -0500

Dear Amber Community,

I’m trying to use commands via the ParmEd API in my own python program, but I have three problems:

1) The Change command in the below script returns the wrong result. The output from the script reads:

  Changing CHARGE of atom # 1663 (FE) from 3.0 to 3.0000

But if I use the ParmEd interpreter on the same (BioDC.prmtop) topology, I get:
> change CHARGE .FE 3.0
  Changing CHARGE of atom # 1663 (FE) from 0.43069999999999997 to 3.0000

2) The outparm command in the below script returns:
Traceback (most recent call last):
  File "/data/BioDCTestSet/1AKK/oxidized/pmd.py", line 13, in <module>
    outparm('test.prmtop')
  File "/usr/local/amber22/lib/python3.9/site-packages/parmed/tools/actions.py", line 144, in __init__
    raise TypeError('input_parm expected to be a ParmList or Structure instance')
TypeError: input_parm expected to be a ParmList or Structure instance

What does this mean?

3) I need to change the charge on several atoms. What is an efficient way to do this?

Relevant script:

#!/usr/bin/env python

from parmed.amber import AmberParm
from parmed.tools import change
from parmed.tools import outparm

parm = AmberParm('BioDC.prmtop', 'BioDC.rst7')

action = change(parm, "CHARGE", ".FE", 3.0)
action.execute()
print(str(action))
outparm('test.prmtop')




Thank you in advance for the help!

Best,
Matthew









_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sat Dec 16 2023 - 10:00:02 PST
Custom Search