[gmx-users] How to combine two gro files in one big file

Justin A. Lemkul jalemkul at vt.edu
Wed May 26 02:57:32 CEST 2010



Yan Gao wrote:
> Thank you Vandana and Justin, the cat command solve the problem.
> 
> Regarding the removement of the unnecessary lines in the middle, is 
> there a command that can do it automatically? or one has to make code by 
> self? Thanks.
> 

That's a trivial exercise for a simple text editor.

-Justin

> Yan
> 
> On Tue, May 25, 2010 at 3:25 PM, Justin A. Lemkul <jalemkul at vt.edu 
> <mailto:jalemkul at vt.edu>> wrote:
> 
> 
> 
>     VANDANA KUMARI wrote:
> 
>         Hi Yan,
> 
>         You can do it by converting your both gro file into pdb files
>         and concatenating both  pdb files into one file . and you can
>         convert pdb into gro using editconf
>         steps are as follows:
> 
>         1. editconf -f 1.gro -o 1.pdb
>         2. editconf -f 2.gro -o 2.pdb
> 
>         3. cat 1.pdb 2.pdb > both.pdb
> 
>         you need to delete unnecessary line i.e. CRYST1 or END from you
>         both.pdb file
> 
>         4. editconf -f both.pdb -o both.gro
> 
> 
>     Conversion back and forth between .pdb and .gro is not required (but
>     it does work).  The main point of creating a concatenated file is
>     that both molecules are placed correctly within the same box, so for
>     each:
> 
>     editconf -f 1.gro -o 1_newbox.gro -center x y z -box x y z
>     (and the same for molecule 2)
> 
>     Getting the molecule positions and box vectors right is the real trick.
> 
>     Then concatenate, remove unnecessary box and header lines in the
>     middle of the file, correct the atom count and you're done.
> 
>     -Justin
> 
> 
> 
> 
>         --
>         Vandana Kumari
>         ------------------------------------------------------------------------
>         *From:* gmx-users-bounces at gromacs.org
>         <mailto:gmx-users-bounces at gromacs.org>
>         [gmx-users-bounces at gromacs.org
>         <mailto:gmx-users-bounces at gromacs.org>] on behalf of Yan Gao
>         [y1gao at ucsd.edu <mailto:y1gao at ucsd.edu>]
>         *Sent:* Tuesday, May 25, 2010 5:33 PM
>         *To:* Discussion list for GROMACS users
>         *Subject:* [gmx-users] How to combine two gro files in one big file
> 
>         Hi there,
> 
>         I want to simulate two molecules which are identical, and one is
>         rotated/translated from another. I have the gro file for one
>         molecule.
> 
>         I tried editconf, which helped manipulate the molecule. Then I
>         want to combine it with the original gro file, so that the two
>         identical molecules are placed in one file. I searched the
>         manual but could not find a proper command. Could anyone help?
>         Thanks.
> 
>         -- 
>         Yan
> 
> 
>     -- 
>     ========================================
> 
>     Justin A. Lemkul
>     Ph.D. Candidate
>     ICTAS Doctoral Scholar
>     MILES-IGERT Trainee
>     Department of Biochemistry
>     Virginia Tech
>     Blacksburg, VA
>     jalemkul[at]vt.edu <http://vt.edu> | (540) 231-9080
>     http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin
> 
>     ========================================
>     -- 
>     gmx-users mailing list    gmx-users at gromacs.org
>     <mailto:gmx-users at gromacs.org>
>     http://lists.gromacs.org/mailman/listinfo/gmx-users
>     Please search the archive at http://www.gromacs.org/search before
>     posting!
>     Please don't post (un)subscribe requests to the list. Use the www
>     interface or send it to gmx-users-request at gromacs.org
>     <mailto:gmx-users-request at gromacs.org>.
>     Can't post? Read http://www.gromacs.org/mailing_lists/users.php
> 
> 
> 
> 
> -- 
> Yan Gao
> Jacobs School of Engineering
> University of California, San Diego
> Tel: 858-952-2308
> Email: Yan.Gao.2001 at gmail.com <mailto:Yan.Gao.2001 at gmail.com>

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

Justin A. Lemkul
Ph.D. Candidate
ICTAS Doctoral Scholar
MILES-IGERT Trainee
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080
http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin

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



More information about the gromacs.org_gmx-users mailing list