Re: [AMBER] On Amber to Gromacs Parameter Conversion

From: Robert Molt <rwmolt07.gmail.com>
Date: Thu, 10 Mar 2016 23:48:23 -0500

Good evening,

That makes more sense. I installed it just fine for my user account.
However, I concede I am still screwing something up. After compiling OK,
I created my_script.py with contents

#!/bin/python
import parmed as pmd

amber = pmd.load_file('name_change_piggy.prmtop', '03_Equilibrate.mdcrd')
# Save a GROMACS topology and GRO file
amber.save('gromacs.top')
amber.save('gromacs.gro')

I attempted to execute this via

python my_script.py

and get the error

Traceback (most recent call last):
   File "my_script.py", line 2, in <module>
     import parmed as pmd
ImportError: No module named parmed

which is to say, it looks like it does not recognize the python command.

Separately, it's obviously time I learned Python...if there is a quick
fix, in the interim, it would nonetheless be appreciated. If I can
manage to convert this amber topology to GROMACS form, I can use a type
of trajectory analysis on DNA helices not suitable with the current form
of Amber.


On 3/10/16 10:32 PM, Hai Nguyen wrote:
> Hi
>
> On Thu, Mar 10, 2016 at 8:45 PM, Robert Molt <rwmolt07.gmail.com> wrote:
>
>> Good evening,
>>
>> I am somewhat confused on execution; I am having trouble reconciling the
>> manual and the example. In the example given, it seems like one is using
>> a Linux command (import) in csh rather than bash, as if one is doing
>> this on the command line. If so, why is Amber being defined as a
>> variable on the next line? I do not see "import" as a command in the
>> manual under parmed, so I assume this not meant to be done within the
>> ParmEd interface? Or perhaps this is written in Python, and this is the
>> use of "import?" I'm not familiar with Python so I am unsure.
>>
>>
> I am sorry for the confusion. I don't think AT15 supports conversion from
> amber to gromacs. So I suggested to use developing version of ParmEd.
> The commands I sent are Python code.
>
> First, you need to install developing version of ParmEd from pip:
> *pip install https://github.com/ParmEd/ParmEd/archive/2.0.5.tar.gz
> <https://github.com/ParmEd/ParmEd/archive/2.0.5.tar.gz>*
>
> After successfully install ParmEd, you create a file name your_script.py
> with the command I sent.
> then run in shell: *python your_script.py *(should be similiar as using
> cpptraj)
>
>
>> Is it possible to just enter a series of commands a la stdin being read
>> into parmed.py
> I think this is in todo list: https://github.com/ParmEd/ParmEd/issues/341
>
> I do not see a command in the manual under parmed that
>> seems associated with an output of a different file type? parmout just
>> says to print out the revised topology file after given commands; it's
>> not obvious to me if a command corresponds to this. I would guess not,
>> given that the above example does not take this route?
>>
>>
> yeah, the conversion is not existing in release version yet.
>
> Hai
>
>
>> On 3/10/16 4:13 PM, Hai Nguyen wrote:
>>> Hi,
>>>
>>> For topology conversion, it would be best to use ParmEd to do that
>>>
>>> Jason made an example here:
>>> https://github.com/ParmEd/ParmEd/issues/631 (required
>>> develop version of ParmEd)
>>>
>>> Just curious: what type of analysis that AMBER does not offer (so we can
>>> add more function if possible).
>>>
>>> Hai
>>>
>>> import parmed as pmd
>>>
>>> amber = pmd.load_file('prmtop', 'inpcrd')
>>> # Save a GROMACS topology and GRO file
>>> amber.save('gromacs.top')
>>> amber.save('gromacs.gro')
>>>
>>>
>>> On Thu, Mar 10, 2016 at 3:55 PM, Robert Molt <rwmolt07.gmail.com> wrote:
>>>
>>>> Good afternoon,
>>>>
>>>> I would like to convert my data into the GROMACS file type because I
>>>> need to use an analysis tool only written for GROMACS. It's easy enough
>>>> to convert a trajectory file in cpptraj:
>>>>
>>>> parm piggy.prmtop
>>>> trajin full_no_waters.mdcrd 1 last 1
>>>> autoimage
>>>> trajout gromacs.trr trr
>>>> go
>>>> quit
>>>>
>>>> It does not seem, from the options in the manual, that cpptraj has a way
>>>> to produce an associated parameter file in the GROMACS format. This
>>>> confuses me, because I am unsure what good a GROMACS trajectory would be
>>>> without the associated topology file. Under parmwrite, the manual seems
>>>> to imply that one can select an alternative format for the parameter
>>>> file (but the manual gives no examples of what formats are possible). Is
>>>> it possible to convert Amber topology files to GROMACS style using the
>>>> parmwrite keyword in cpptraj?
>>>>
>>>>
>>>> _______________________________________________
>>>> AMBER mailing list
>>>> AMBER.ambermd.org
>>>> http://lists.ambermd.org/mailman/listinfo/amber
>>>>
>>> _______________________________________________
>>> AMBER mailing list
>>> AMBER.ambermd.org
>>> http://lists.ambermd.org/mailman/listinfo/amber
>> --
>> Dr. Robert Molt Jr.
>> r.molt.chemical.physics.gmail.com
>>
>>
>> _______________________________________________
>> AMBER mailing list
>> AMBER.ambermd.org
>> http://lists.ambermd.org/mailman/listinfo/amber
>>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber

-- 
Dr. Robert Molt Jr.
r.molt.chemical.physics.gmail.com
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Mar 10 2016 - 21:00:03 PST
Custom Search