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

Justin Lemkul jalemkul at vt.edu
Thu Apr 27 20:25:03 CEST 2017



On 4/27/17 2:22 PM, Dilip H N 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)..??

The answers to (1) and (2) can be found simply by reading the source code.  In 
(1), it's a simple translation of the coordinates so that they're centered in 
the new box.

> 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..
>

In its simplest form, that's just a bunch of system calls within the Python 
script.  You can easily do this as a normal shell script without even having to 
invoke Python at all.

-Justin

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

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