Nice trick - I didn't realise you could chain and group sed regular expressions that way!
Neither did I know pdb2gmx had an .arn database. That's two things I've learned... Can I go home now? :-D Mark On Mar 10, 2014 7:32 AM, "Tsjerk Wassenaar" <tsje...@gmail.com> wrote: > cat $pdbfile | sed 's/TIP3/SOL /' | sed 's/ OH2 SOL/ OW SOL/' | sed 's/ > > H1 SOL/ HW1 SOL/' | sed 's/ H2 SOL/ HW2 SOL/' | sed 's/ SOD SOD/ NA NA > > /g > > ' | sed 's/ CLA CLA/ CL CL /g' > > > > Something like this in one command?: > > sed 's/TIP3/SOL /;/SOL/{s/OH2/OW /;s/H1 /HW1/;s/H2 /HW2/;};s/SOD/NA > /g;s/CLA/CL /g;' $pdbfile > > Cheers, > > Tsjerk > > -- > Tsjerk A. Wassenaar, Ph.D. > -- > 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-requ...@gromacs.org. > -- 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-requ...@gromacs.org.