From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Wed May 12 2021 - 04:30:22 CDT

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!p75EjZV-Eoegm1Mu1BGo84jMd_2txbyX2YjJI2P_ZNLiO0L3CNMlLHpA0umxF_YEXw$ 
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.