Re: [AMBER] Regarding the use of sed command to replace water

From: Adrian Roitberg <roitberg.ufl.edu>
Date: Wed, 31 Aug 2016 13:58:29 -0600

It is not clear to me WHY you want to do what you want to do, but
anyways, you need to do

sed 's/HOH /TIP3P/g' filename

Note space after HOH. That way you will replace a 4 character string with a 4 character string and the rest should stay the same.

adrian


On 8/31/16 1:52 PM, Budhathoki, Dipesh wrote:
> Dear Ambers,
> I am new to the use of sed editor and learning how to use it effectively.I
> am trying to replace HOH with TIP3P in the PDB flle without affecting other
> columns (ie. without affecting format of the pdb). But I am finding it
> difficult to keep the format as it is. The sed command I am using is as
> follows:
>
> sed 's/HOH/TIP3P/g' filename
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber

-- 
Dr. Adrian E. Roitberg
University of Florida Research Foundation Professor.
Department of Chemistry
University of Florida
roitberg.ufl.edu
352-392-6972
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Aug 31 2016 - 13:00:05 PDT
Custom Search