Hi Vaheh - 

I wasn't saying it can't be done, just that pdbset is my preferred way to 
handle renumbering when going in the insertion code --> integer direction.

Within PyMOL, here is one way (you'll have to repeat for each chain you wish to 
renumber):

```
# see: https://pymolwiki.org/index.php/Pymol.stored
from pymol import stored

# store the current residue numbers in a list
stored.oldresi = []
iterate polymer.protein and chain L and n. CA, stored.oldresi.append(resi)

# make a list of the new residue numbers
stored.newresi = list(range(1, len(stored.oldresi)+1))

# zip them together into a lookup dict
stored.hash = dict(zip(stored.oldresi, stored.newresi))

# change the residue numbers for each atom in your chain
alter polymer.protein and chain L, resi=stored.hash[resi]
```

Hope that helps.

Cheers,
Jared



From: Oganesyan, Vaheh <vaheh.oganes...@astrazeneca.com>
Reply: Oganesyan, Vaheh <vaheh.oganes...@astrazeneca.com>
Date: June 15, 2020 at 3:57:24 PM
To: Jared Sampson <jared.samp...@columbia.edu>
Cc: pymol-users@lists.sourceforge.net <pymol-users@lists.sourceforge.net>
Subject:  RE: [PyMOL] renumber  

Jared,

 

Are you saying it cannot be done within PyMOL? The ccp4 option is well known.

 

Thanks.

 

From: Jared Sampson <jared.samp...@columbia.edu>  
Sent: Monday, June 15, 2020 2:41 PM
To: Oganesyan, Vaheh <vaheh.oganes...@astrazeneca.com>
Cc: pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] renumber

 

Hi Vaheh -

 

Try `pdbset` from the CCP4 suite.

 

http://www.ccp4.ac.uk/html/pdbset.html#renumber

 

```

pdbset xyzin in.pdb xyzout out.pdb > pdbset.log << EOF

renum 1 chain H

renum 1 chain L

end

EOF

```

 

Hope that helps.

 

Cheers,

Jared

 


From: Oganesyan, Vaheh <vaheh.oganes...@astrazeneca.com>
Reply: Oganesyan, Vaheh <vaheh.oganes...@astrazeneca.com>
Date: June 15, 2020 at 1:28:23 PM
To: Mooers, Blaine H.M. (HSC) <blaine-moo...@ouhsc.edu>, Jarrett Johnson 
<jarrett.john...@schrodinger.com>
Cc: pymol-users@lists.sourceforge.net <pymol-users@lists.sourceforge.net>
Subject:  Re: [PyMOL] renumber




Blain,

 

The command will not change the numbering of amino acids starting from #1. But 
if you got missing ones, like in my case, it will. Except for those having also 
letter in the number field. I mean the numbering used for CDRs of antibodies, 
not alternatives. Hence, my question, is there a command that will ignore the 
letters in the number field and renumber the amino acids in the order they 
appear in the file.

 

Thank you.

 

From: Mooers, Blaine H.M. (HSC) <blaine-moo...@ouhsc.edu>  
Sent: Monday, June 15, 2020 12:06 PM
To: Oganesyan, Vaheh <vaheh.oganes...@astrazeneca.com>; Jarrett Johnson 
<jarrett.john...@schrodinger.com>
Cc: pymol-users@lists.sourceforge.net
Subject: RE: [PyMOL] renumber

 

Hi Vaheh,

alter vh, resi=str(int(resi)+0)

will not change the residue numbers because 0 is being added.
Replace 0 with your desired residue number offset.

Best regards,

Blaine

Blaine Mooers, Ph.D.
Associate Professor
Department of Biochemistry and Molecular Biology
College of Medicine
University of Oklahoma Health Sciences Center
S.L. Young Biomedical Research Center (BRC) Rm. 466
975 NE 10th Street, BRC 466
Oklahoma City, OK 73104-5419

________________________________________
From: Oganesyan, Vaheh [vaheh.oganes...@astrazeneca.com]
Sent: Monday, June 15, 2020 10:49 AM
To: Jarrett Johnson
Cc: pymol-users@lists.sourceforge.net
Subject: [EXTERNAL] Re: [PyMOL] renumber

Thank you Jarrett,

Then the command

alter vh, resi=str(int(resi)+0)

should work, right? But it doesn’t because there are residue numbers with 
letters. Is there a command that will either remove the letters or won’t pay 
attention to them and renumber sequentially.

Regards,


From: Jarrett Johnson <jarrett.john...@schrodinger.com>
Sent: Monday, June 15, 2020 11:38 AM
To: Oganesyan, Vaheh <vaheh.oganes...@astrazeneca.com>
Cc: pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] renumber

Hello,

The command shown on this page 
https://pymolwiki.org/index.php/Renumber<https://urldefense.proofpoint.com/v2/url?u=https-3A__pymolwiki.org_index.php_Renumber&d=DwMGaQ&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=HQhXfRvgQZ3mFRTUuOGKZTZZVlTRi9o87ygYqEDnPog&s=ziFhw29qVsmpI-rra_AyanmqFEsNZVmEsXF4VIjUMmI&e=>
 is not one that comes with PyMOL by default. Try downloading the script and 
importing it via the `run` command in the PyMOL command-line:

run 
renumber.py<https://urldefense.proofpoint.com/v2/url?u=http-3A__renumber.py&d=DwQGaQ&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=HQhXfRvgQZ3mFRTUuOGKZTZZVlTRi9o87ygYqEDnPog&s=FHmoNz1s1Pj-_paiWCTfneG3RkPiLccu2uI2KNr8ROw&e=>

and then you should be able to use the command as shown on the Wiki page.

Hope that helps,
Jarrett J.

On Mon, Jun 15, 2020 at 11:29 AM Oganesyan, Vaheh 
<vaheh.oganes...@astrazeneca.com<mailto:vaheh.oganes...@astrazeneca.com>> wrote:

Hello PyMOLers,

Wiki uses renumber command to alter residue numbers, but PyMOL doesn’t 
recognize it. Is it that Wiki is old, or my PyMOL version is dusty?


Regards,

Vaheh

_______________________________________________
PyMOL-users mailing list
Archives: 
http://www.mail-archive.com/pymol-users@lists.sourceforge.net<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mail-2Darchive.com_pymol-2Dusers-40lists.sourceforge.net&d=DwMGaQ&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=HQhXfRvgQZ3mFRTUuOGKZTZZVlTRi9o87ygYqEDnPog&s=0jiLKKRpirp3ZmCRyyo_9R1IshveF24db_HqbNveLVE&e=>
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe<https://urldefense.proofpoint.com/v2/url?u=https-3A__sourceforge.net_projects_pymol_lists_pymol-2Dusers_unsubscribe&d=DwMGaQ&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=HQhXfRvgQZ3mFRTUuOGKZTZZVlTRi9o87ygYqEDnPog&s=u0GfpqJznDAnSRPi-ENNk5i5F203FOoK4e8tFBNx-fc&e=>


--

Jarrett Johnson | Senior Developer

[Schrodinger 
Logo]<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.schrodinger.com_&d=DwMGaQ&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=HQhXfRvgQZ3mFRTUuOGKZTZZVlTRi9o87ygYqEDnPog&s=my7IR5rxG-1yA5AP52htw3MT5MKRSqHAwEmOVfdcSdc&e=>

_______________________________________________  
PyMOL-users mailing list  
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net  
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe
_______________________________________________
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Reply via email to