Dear Tusar:

Let's keep this on the mailing list.

You could learn about expr with a simple google search! It should have worked though, did you mangle the command somehow when you typed it? There should be " > not_last_line.gro" with a redirect at the end but you have only a star. Nevertheless, my scripting has improved a bit since I wrote that and you could replace 7 by:

head -n -1 initial.gro > not_last_line.gro

And, to answer your second question, you use keep_these_waters.gro in part 8, along with other files, to create new_system.gro

Chris.

-- original message --

I am trying to increase the size of the water segment in the z-direction.
For this purpose I am following your recommended steps and the script.

1. run genbox on initial.gro to create solvated.gro
2. cp solvated.gro new_waters.gro
3. use vi to remove everything in new_waters.gro except the new waters (make
sure you remove waters that were in initial.gro)
4. use vi to edit keepbyz.pl
   - upperz and lowerz variables as you please
   - sol to the name of your solvent molecule
5. run keepbyz.pl on new_waters.gro
   ./keepbyz new_waters.gro > keep_these_waters.gro
6. tail -1 initial.gro > last_line.gro
7. head -$(expr $(cat initial.gro | wc -l | awk '{print $1}') - 1 ) initial.gro
* not_last_line.gro
*8. cat not_last_line.gro new_waters.gro last_line.gro > new_system.gro 9. editconf -f new_system.gro -o new_system_sequential_numbers.gro

I could successfully go through steps 1 to 6. However, I am unable to
execute step 7. In particular, what is "expr" in step7? Moreover, The file,
"

keep_these_waters.gro" that I have generated in step 5, where do I use
it subsequently?

I shall remain obliged for your kind answer.
Best Regards.


--
Dr. Tusar Bandyopadhyay
Theoretical Chemistry Section,
Chemistry Group
BARC, Trombay

--
gmx-users mailing list    gmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the
www interface or send it to gmx-users-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

Reply via email to