VMD-L Mailing List
From: Vermaas, Josh (vermaasj_at_msu.edu)
Date: Wed Nov 17 2021 - 20:50:42 CST
- Next message: Georcki Ropon: "Re: Change Atom serial Atom"
- Previous message: Axel Kohlmeyer: "Re: Change Atom serial Atom"
- In reply to: Georcki Ropon: "Re: 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 ]
Ooooh… I’m up late writing things. Do the braces match on the 3rd from the last line?
-Josh
From: Georcki Ropon <groponp_at_gmail.com>
Date: Wednesday, November 17, 2021 at 9:41 PM
To: "Vermaas, Josh" <vermaasj_at_msu.edu>
Cc: "vmd-l_at_ks.uiuc.edu" <vmd-l_at_ks.uiuc.edu>
Subject: Re: vmd-l: Change Atom serial Atom
Prof. Josh,
I’m using
package require topotools
mol new prot_orient_add_ter.pdb
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
quit
But not write pdb
On Nov 17, 2021, at 21:34, Vermaas, Josh <vermaasj_at_msu.edu<mailto:vermaasj_at_msu.edu>> wrote:
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!qs8qj805oOseKjB51Pv322EzDD3AdD_wJlmYe6hWdH7UffQbRqfOGa_DSOE30AYK1w$ <https://urldefense.com/v3/__https:/sites.google.com/site/akohlmey/software/topotools/documentation__;!!HXCxUKc!nOVXOsPz35d1fh5jKHabfOrKTBoaB1bAzK88bVJJ7kDAU35Wzenneg6wXfyXz2U$>:
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!qs8qj805oOseKjB51Pv322EzDD3AdD_wJlmYe6hWdH7UffQbRqfOGa_DSOGwPwgVgA$
- Next message: Georcki Ropon: "Re: Change Atom serial Atom"
- Previous message: Axel Kohlmeyer: "Re: Change Atom serial Atom"
- In reply to: Georcki Ropon: "Re: 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 ]