VMD-L Mailing List
From: Vermaas, Josh (vermaasj_at_msu.edu)
Date: Wed Nov 17 2021 - 20:34:02 CST
- Next message: Georcki Ropon: "Re: Change Atom serial Atom"
- Previous message: Georcki Ropon: "Re: Change Atom serial Atom"
- In reply to: Georcki Ropon: "Change Atom serial Atom"
- Next in thread: Georcki Ropon: "Re: Change Atom serial Atom"
- Reply: Georcki Ropon: "Re: Change Atom serial Atom"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi Georcki,
Serial number and indices aren't mutable, but are instead inferred from the order the atoms appear in the pdb. The way I'd do this is to use topotools to reorder the atoms so that atoms that match segid PROB end up first. Borrowed from https://urldefense.com/v3/__https://sites.google.com/site/akohlmey/software/topotools/documentation__;!!DZ3fjg!vFQmpulJhkl0pGH0Eq5OMI2ePWX4esX-m58Mm2ALa80HbLk-1S3p3GYlB7_V3UmX6g$ :
package require topotools
set prob [atomselect top "segid PROB"]
set notprob [atomselect top "not segid PROB"]
set mol [::TopoTools::selections2mol [list $prob $notprob]
animate write pdb reordered.pdb $mol
-Josh
On 11/17/21 8:04 PM, Georcki Ropon wrote:
Dear user,
I want change serial atom number , my number start with 3000 but I want all number (para chain B) start 1 2 3 4 ….
Bellow my code but not fix it.
mol new prot_orient_add_ter.pdb
set prob [atomselect top "segid PROB"]
set serials [$prob get serial]
set count 0
foreach atom $serials {
$prob set serial $count
incr $count
}
set all [atomselect top all]
$all writepdb renum.pdb
quit
-- Josh Vermaas Assistant Professor, MSU-DOE Plant Research Lab and Department of Biochemisty and Molecular Biology vermaasj_at_msu.edu<mailto:vermaasj_at_msu.edu> https://urldefense.com/v3/__https://prl.natsci.msu.edu/people/faculty/josh-vermaas/__;!!DZ3fjg!vFQmpulJhkl0pGH0Eq5OMI2ePWX4esX-m58Mm2ALa80HbLk-1S3p3GYlB7-qvz2IIg$
- Next message: Georcki Ropon: "Re: Change Atom serial Atom"
- Previous message: Georcki Ropon: "Re: Change Atom serial Atom"
- In reply to: Georcki Ropon: "Change Atom serial Atom"
- Next in thread: Georcki Ropon: "Re: Change Atom serial Atom"
- Reply: Georcki Ropon: "Re: Change Atom serial Atom"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]