[gmx-users] Regarding reading .gro file in python

Justin Lemkul jalemkul at vt.edu
Thu Apr 27 20:30:55 CEST 2017



On 4/27/17 2:26 PM, Dilip H N wrote:
> and how are the x,y,z coordinates, velocities assigned with the values..??
> the logic behind them in gromacs
>

Again, I encourage you to look into the source code.  This is a rather vague 
question.  Different programs do different things to coordinates and velocities 
depending on the task at hand.  grompp generates random velocities but mdrun 
calculates and saves them; each is very different.  pdb2gmx can build H 
coordinates and both trjconv, editconf, solvate, genion, etc. can manipulate 
them in different ways.

-Justin

> Thank you
>
>
>
>   <https://mailtrack.io/> Sent with Mailtrack
> <https://mailtrack.io/install?source=signature&lang=en&referral=cy16f01.dilip@nitk.edu.in&idSignature=22>
>
> On Thu, Apr 27, 2017 at 11:52 PM, Dilip H N <cy16f01.dilip at nitk.edu.in>
> wrote:
>
>> Thank you Oliver Beckstein Sir, Dawid das Sir,
>>
>> My questions are..
>>
>> 1] I got the initial configuration of a molecule in .pdb format and thn i
>> gave the command
>> gmx editconf -f .pdb -o box.gro -c -box x y z
>> what happens in the background when this command is given..?? (the C++
>> program runs in which gromacs is written)
>> so what is the logic in tht program..??
>> 2] and i have a initial .gro file and thn i want to insert more number of
>> molecules of tht to a box created i give the command
>> gmx insert-molecules -f .box.gro -ci ab.gro -nmol x -o abc.gro
>> so in the above command the molecules tht i want to insert gets inserted
>> in the empty spaces of the box...How is this defined in the program (such
>> tht the molecules should be inserted into the empty spaces only)..??
>> 3] Yes,I want create an automatic tool in Python which sets up calculations
>> for me  and possibly runs them...
>> So that this Python script calls pdb2gmx, editconf, etc..
>>
>> Thank you
>>
>>
>>   <https://mailtrack.io/> Sent with Mailtrack
>> <https://mailtrack.io/install?source=signature&lang=en&referral=cy16f01.dilip@nitk.edu.in&idSignature=22>
>> <#m_6373284441246192622_>
>>
>> On Thu, Apr 27, 2017 at 10:41 PM, Dawid das <addiw7 at googlemail.com> wrote:
>>
>>> Hello Dilip,
>>>
>>>  I don't really get what your problem is. What do you actually want to do?
>>> Read-in and parse a *.gro file which
>>> is output from MD simulation? Then for instance, your Python script should
>>> calculate something from, e.g. distance
>>> between centres of masses of residues of interest?
>>> Or do you want create an automatic tool in Python which sets up
>>> calculations for you and possibly runs them?
>>> So that this Python script calls pdb2gmx, editconf, etc.
>>>
>>> I have written various scripts for parsing output files from Gromacs
>>> simulations for my pretty specific purposes.
>>> Anyway if you may find them useful, I will be happy to share them with
>>> you.
>>>
>>> Best wishes,
>>> Dawid
>>>
>>> 2017-04-27 18:53 GMT+02:00 Oliver Beckstein <obeckste at asu.edu>:
>>>
>>>> Hi Dilip,
>>>>
>>>> I think the next version of Gromacs will have some Python bindings.
>>>>
>>>> Until then you can use MDAnalysis http://mdanalysis.org : It reads GRO
>>>> files (as well as XTC, TRR, and TPR, … and many other formats) and
>>> loads it
>>>> into a numpy array.
>>>>
>>>> (If you have questions regarding MDAnalysis please ask on the
>>> MDAnanlysis
>>>> user mailing http://users.mdanalysis.org list instead of the Gromacs
>>>> list.)
>>>>
>>>> Best wishes,
>>>> Oliver (disclosure: I am one of the core developers of MDAnalysis)
>>>>
>>>>> On 27 Apr, 2017, at 09:46, Dilip H N <cy16f01.dilip at nitk.edu.in>
>>> wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> I want to write a python program to read a .gro file in gromacs.. How
>>>> can i
>>>>> write the program / code to read the .gro file...
>>>>>
>>>>> I need to write a python programm to read the .gro file and write as
>>> it
>>>>> is.. can anybody help me regarding this...
>>>>>
>>>>> Thank you..
>>>>>
>>>>> --
>>>>> With Best Regards,
>>>>>
>>>>> DILIP.H.N
>>>>> Ph.D Student
>>>>>
>>>>
>>>> --
>>>> Oliver Beckstein, DPhil * oliver.beckstein at asu.edu
>>>> http://becksteinlab.physics.asu.edu/
>>>>
>>>> Assistant Professor of Physics
>>>> Arizona State University
>>>> Center for Biological Physics and Department of Physics
>>>> Tempe, AZ 85287-1504
>>>> USA
>>>>
>>>> Office: PSF 348
>>>> Phone: +1 (480) 727-9765
>>>> FAX: +1 (480) 965-4669
>>>>
>>>> Department of Physics: https://physics.asu.edu/content/oliver-beckstein
>>>> Center for Biological Physics: https://cbp.asu.edu/content/
>>>> oliver-beckstein
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Gromacs Users mailing list
>>>>
>>>> * Please search the archive at http://www.gromacs.org/
>>>> Support/Mailing_Lists/GMX-Users_List before posting!
>>>>
>>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>>
>>>> * For (un)subscribe requests visit
>>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
>>>> send a mail to gmx-users-request at gromacs.org.
>>>>
>>> --
>>> Gromacs Users mailing list
>>>
>>> * Please search the archive at http://www.gromacs.org/Support
>>> /Mailing_Lists/GMX-Users_List before posting!
>>>
>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>
>>> * For (un)subscribe requests visit
>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
>>> send a mail to gmx-users-request at gromacs.org.
>>>
>>
>>
>>
>> --
>> With Best Regards,
>>
>> DILIP.H.N
>> Ph.D Student
>>
>
>
>

-- 
==================================================

Justin A. Lemkul, Ph.D.
Ruth L. Kirschstein NRSA Postdoctoral Fellow

Department of Pharmaceutical Sciences
School of Pharmacy
Health Sciences Facility II, Room 629
University of Maryland, Baltimore
20 Penn St.
Baltimore, MD 21201

jalemkul at outerbanks.umaryland.edu | (410) 706-7441
http://mackerell.umaryland.edu/~jalemkul

==================================================


More information about the gromacs.org_gmx-users mailing list