[gmx-users] how to write in a script?

Albert mailmd2011 at gmail.com
Thu Aug 7 13:51:04 CEST 2014


Hi Chanda:

thx a lot for the helps, it works now.

However, I've got another question:

I am trying to insert "#ifdef POSRES_UNK" into ligand.itp file between 
fowllowing two lines:

; position restraints for System of

[ position_restraints ]

Here is my script:

cat $pwd/$i/tmp.itp | sed '/; position restraints for System of \"/a\
#ifdef POSRES_UNK
' >| tmp2.itp
cat tmp2.itp >> ligand.itp

But it seems that the string "#ifdef POSRES_UNK" doesn't add to desired 
.itp file.

Does anybody have any idea where is the problem?

thx a lot

Albert



On 08/07/2014 01:04 PM, Chandan Choudhury wrote:
> Dear Albert,
>
> You can have a look at the following page
> http://www.gromacs.org/Documentation/How-tos/Using_Commands_in_Scripts
>
> Chandan



More information about the gromacs.org_gmx-users mailing list