| Quick navigation: | Home | Site Map || References | Biography || Copyright | Other copyright | Contact us | Advert | | |
Re: [ccp4bb] sequential renumbering of a messed up pdb file |
||
- Protein crystallographyMain steps:- Protein purification- Crystallisation Special:- Programs for crystallography- X-ray detectors Basic tutorials:- Chemistry- Protein - Peptide - Amino Acids Xtal community:- CCP4BB |
CCP4bb navigationCCP4bb <-- 1999 <-- November 1999 <-- 30 November 1999Subject: Re: sequential renumbering of a messed up pdb file From: "William G {- dot -} Scott" wgscott {- at -} CHEMISTRY {- dot -} UCSC {- dot -} EDU Date: 2008-08-01 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/ >>>> >> >> CCP4bb navigationCCP4bb <-- 1999 <-- November 1999 <-- 30 November 1999 |
|
| ProteinCrystallography.org: Copyright 2006-2010 by Quid United Ltd |