From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Wed May 12 2021 - 08:20:02 CDT

if I remember correctly (it is about 10 years since I wrote that code),
topotools doesn't use the "name" property, but the "type" property of
selected atoms.
Since .pdb files do not provide a field for atom types (those are usually
imported from .psf files) VMD may assign the same value to "name" and
"type" when reading a .pdb file.

On Wed, May 12, 2021 at 9:13 AM Yann Claveau <yann.claveau_at_univ-rennes1.fr>
wrote:

> Actually it does not work. I guess I'm doing something wrong.
>
> I use for instance
>
> $selSi set name 1Si
>
> But then, following the tutorial part 1 (
> https://urldefense.com/v3/__https://sites.google.com/site/akohlmey/software/topotools/topotools-tutorial---part-1__;!!DZ3fjg!uR7MJf1Xjt8iIzdq9DNy99pDvT8iU0XpPvrHCvB9DfqLg9PH1WTyypi8-rQ5TprzTQ$
> ), Only the orginal atomtype names are in the lammps data file.
>
> I could modify the pdb first by replacing the name (as in 1Si) but if
> there is a better way with topotools let me know.
>
> Cheers,
>
> Yann
>
>
> Le 12/05/2021 à 11:30, Axel Kohlmeyer a écrit :
>
>
>
> On Wed, May 12, 2021 at 5:16 AM Yann Claveau <yann.claveau_at_univ-rennes1.fr>
> wrote:
>
>> Dear all,
>>
>> I used topotools to convert a pdb file into lammps data. I would like to
>> know if it is possible to change the numbering of atoms in the lammps data
>> file.
>>
>> Here is an example : Consider 3 atom type : H, O, Si.
>>
>> I selected them using
>>
>> set selSi [atomselect top {name Si}]
>> set selO [atomselect top {name O}]
>> set selH [atomselect top {name H}]
>>
>> Then, after analysis (topo retypebonds, topo guessangles, mol reanalyze
>> top) I created the lamms data file.
>>
>> topo writelammpsdata data.example
>>
>> In this file, atoms are ordered alphabetically:
>>
>> 1 H
>> 2 O
>> 3 Si
>>
>> is it possible to change this order using topotools, for instance:
>>
>> 1 Si
>> 2 H
>> 3 O
>>
>>
> the simplest way to achieve this would be by (re-)naming the atoms so they
> will sort in the desired order, e.g. as 1H, 2O, and 3Si.
>
> axel.
>
>> Thanks for your help,
>>
>> --
>> Yann claveau, post-doc
>> Département Matériaux-Nanosciences
>> Bât. 11A, bureau 122,
>> Campus de Beaulieu
>> Institut de Physique de Rennes - UMR-CNRS 6251
>> Université de Rennes 1
>> 35042 Rennes cedex FRANCE
>>
>>
>
> --
> Dr. Axel Kohlmeyer akohlmey_at_gmail.com https://urldefense.com/v3/__http://goo.gl/1wk0__;!!DZ3fjg!uR7MJf1Xjt8iIzdq9DNy99pDvT8iU0XpPvrHCvB9DfqLg9PH1WTyypi8-rTR7B-5Tg$
> College of Science & Technology, Temple University, Philadelphia PA, USA
> International Centre for Theoretical Physics, Trieste. Italy.
>
> --
> Yann claveau, PhD
> Département Matériaux-Nanosciences
> Bât. 11A, bureau 122,
> Campus de Beaulieu
> Institut de Physique de Rennes - UMR-CNRS 6251
> Université de Rennes 1
> 35042 Rennes cedex FRANCE
>
>

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  https://urldefense.com/v3/__http://goo.gl/1wk0__;!!DZ3fjg!uR7MJf1Xjt8iIzdq9DNy99pDvT8iU0XpPvrHCvB9DfqLg9PH1WTyypi8-rTR7B-5Tg$ 
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.