Thank you Vandana and Justin, the cat command solve the problem.<br><br>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.<br>
<br>Yan<br><br><div class="gmail_quote">On Tue, May 25, 2010 at 3:25 PM, Justin A. Lemkul <span dir="ltr">&lt;<a href="mailto:jalemkul@vt.edu">jalemkul@vt.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
<br>
VANDANA KUMARI wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Yan,<br>
<br>
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<br>
steps are as follows:<br>
<br>
1. editconf -f 1.gro -o 1.pdb<br>
2. editconf -f 2.gro -o 2.pdb<br>
<br>
3. cat 1.pdb 2.pdb &gt; both.pdb<br>
<br>
you need to delete unnecessary line i.e. CRYST1 or END from you both.pdb file<br>
<br>
4. editconf -f both.pdb -o both.gro <br>
</blockquote>
<br></div>
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:<br>
<br>
editconf -f 1.gro -o 1_newbox.gro -center x y z -box x y z<br>
(and the same for molecule 2)<br>
<br>
Getting the molecule positions and box vectors right is the real trick.<br>
<br>
Then concatenate, remove unnecessary box and header lines in the middle of the file, correct the atom count and you&#39;re done.<br>
<br>
-Justin<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
<br>
--<br>
Vandana Kumari<br>
------------------------------------------------------------------------<br>
*From:* <a href="mailto:gmx-users-bounces@gromacs.org" target="_blank">gmx-users-bounces@gromacs.org</a> [<a href="mailto:gmx-users-bounces@gromacs.org" target="_blank">gmx-users-bounces@gromacs.org</a>] on behalf of Yan Gao [<a href="mailto:y1gao@ucsd.edu" target="_blank">y1gao@ucsd.edu</a>]<br>

*Sent:* Tuesday, May 25, 2010 5:33 PM<br>
*To:* Discussion list for GROMACS users<br>
*Subject:* [gmx-users] How to combine two gro files in one big file<br>
<br>
Hi there,<br>
<br>
I want to simulate two molecules which are identical, and one is rotated/translated from another. I have the gro file for one molecule.<br>
<br>
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.<br>

<br>
-- <br>
Yan<br>
<br>
</blockquote>
<br></div>
-- <br>
========================================<br>
<br>
Justin A. Lemkul<br>
Ph.D. Candidate<br>
ICTAS Doctoral Scholar<br>
MILES-IGERT Trainee<br>
Department of Biochemistry<br>
Virginia Tech<br>
Blacksburg, VA<br>
jalemkul[at]<a href="http://vt.edu" target="_blank">vt.edu</a> | (540) 231-9080<br>
<a href="http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin" target="_blank">http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin</a><br>
<br>
========================================<br><font color="#888888">
-- <br></font><div><div></div><div class="h5">
gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org" target="_blank">gmx-users@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/search" target="_blank">http://www.gromacs.org/search</a> before posting!<br>
Please don&#39;t post (un)subscribe requests to the list. Use the www interface or send it to <a href="mailto:gmx-users-request@gromacs.org" target="_blank">gmx-users-request@gromacs.org</a>.<br>
Can&#39;t post? Read <a href="http://www.gromacs.org/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Yan Gao<br>Jacobs School of Engineering<br>University of California, San Diego<br>Tel: 858-952-2308<br>Email: <a href="mailto:Yan.Gao.2001@gmail.com">Yan.Gao.2001@gmail.com</a><br>