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

João Henriques joao.henriques.32353 at gmail.com
Thu Aug 7 14:37:29 CEST 2014


Something like this. Edit it according to your needs.

"""
cat > file << EOF
#ifdef POSRES_UNK
EOF​
"""

Yay!

Cheers,

/J


On Thu, Aug 7, 2014 at 12:50 PM, Albert <mailmd2011 at gmail.com> wrote:

> 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
>>
>
> --
> Gromacs Users mailing list
>
> * Please search the archive at http://www.gromacs.org/
> Support/Mailing_Lists/GMX-Users_List before posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>


More information about the gromacs.org_gmx-users mailing list