From: Georcki Ropon (groponp_at_gmail.com)
Date: Wed Nov 17 2021 - 20:42:25 CST

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> 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 fromhttps://sites.google.com/site/akohlmey/software/topotools/documentation <https://urldefense.com/v3/__https://sites.google.com/site/akohlmey/software/topotools/documentation__;!!DZ3fjg!r8jZ5i9V6BU5F-HG44pnO7YxWEjIw7DV-3jaeozAJIscPfRIMWjGN_7Hxv8lHyGqQQ$ >:
>
> 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!r8jZ5i9V6BU5F-HG44pnO7YxWEjIw7DV-3jaeozAJIscPfRIMWjGN_7Hxv_Bo6igUg$ <https://urldefense.com/v3/__https://prl.natsci.msu.edu/people/faculty/josh-vermaas/__;!!DZ3fjg!r8jZ5i9V6BU5F-HG44pnO7YxWEjIw7DV-3jaeozAJIscPfRIMWjGN_7Hxv_Bo6igUg$ >