Dear Martin et al:
This, along with some scripting in coot and my favorite shell (zsh),
did the trick.
Many thanks to all who replied, and apologizes for what in retrospect
must have been a very poorly-worded question.
Maybe this functionality can be incorporated in the next release of
perlmole.
Bill Scott
On Jul 31, 2008, at 9:05 PM, Martin.Laurberg wrote:
Bill,
Almost there then (I wrote the line without checking)..
I moved the 'P' one position to the left and now it works, provided
first
atom record of every atom record is the phosphor (/ P /) atom :
perl -ne 'BEGIN{$i=0}if (/^ATOM/) \
{if (substr($_,12,4) =~ / P /){$i++}; \
substr($_,22,4,sprintf("%4.0f",$i))}{print}' file.pdb
On Thu, 31 Jul 2008, William G. Scott wrote:
turned them all to zeros
William G. Scott
Contact info:
http://chemistry.ucsc.edu/~wgscott/
On Jul 31, 2008, at 5:03 PM, Martin.Laurberg wrote:
Bill, if each residue starts at the same atom name, something
close to
this might work:
perl -ne 'BEGIN{$i=0}if (/^ATOM/){if (substr($_,12,4) =~ / P /){$i+
+};
substr($_,22,4,sprintf("%4.0f",$i))}{print}' file.pdb
/Martin
--
Martin Laurberg, PhD
Noller Laboratory
225 Sinsheimer Laboratories
University of California at Santa Cruz
CA-95064 Santa Cruz
USA
Tel +1 (831) 459 35 84
Fax +1 (831) 459 37 37
On Thu, 31 Jul 2008, William Scott wrote:
Hi folks:
I am hoping there is a simple answer I have overlooked to the
following question. I have a pdb file in it that has multiple
residues that have the same number and chain ID, and I want to
force
them to be renumbered sequentially. Is there a simple way to do so
(eg, pdbset) or am I doomed to fixing it manually?
Thanks.
Bill Scott
William G. Scott
Contact info:
http://chemistry.ucsc.edu/~wgscott/