VMD-L Mailing List
From: Yann Claveau (yann.claveau_at_univ-rennes1.fr)
Date: Thu Jul 15 2021 - 03:27:18 CDT
- Next message: Kiana Jahani: "Adding oxygen molecules"
- Previous message: Fujie Tang: "troubles in setting pbc on m1 mac version"
- In reply to: Axel Kohlmeyer: "Re: vmd change atom type when saving lammpstrj"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Thanks for the explanation. For future work it would be simpler to dump
wrap and unwrap coordinates, I guess.
have a good day,
Yann
Le 13/07/2021 à 22:31, Axel Kohlmeyer a écrit :
> You see a difference because of the differences in the data models in
> VMD and LAMMPS.
> While atom types are numeric in LAMMPS they are strings in VMD. This
> is no problem when reading, since numbers are also valid strings, but
> creates a problem on writing, since not all strings are valid numbers.
> Upon writing the molfile API will pass references to the strings to
> the plugin for writing LAMMPS files and that creates a hash table for
> those strings to map them back to numeric types in the order they are
> encountered. This is where things can become inconsistent.
> To change this behavior you would have to change the C code of the
> LAMMPS molfile plugin to:
> - verify that all atom types are strings of integer numbers
> - have an alternate code path that instead of creating a 1-based map
> of unique strings used for atom types will use an atoi() call to
> convert the string to a number provided the check passes.
>
> This is doable but would require some programming.
>
> Axel.
>
>
>
>
> On Tue, Jul 13, 2021 at 10:04 AM Yann Claveau
> <yann.claveau_at_univ-rennes1.fr <mailto:yann.claveau_at_univ-rennes1.fr>>
> wrote:
>
> Hi all,
>
> I want to unwrap lammps trajectories. I opened the dump.lammpstrj
> in vmd, then did
>
> pbc unwrap -all
>
> It worked. Then I saved the new coordinates. When opening the new
> file, all types have been renamed.
>
> for instance in the dump.wrapped.lammpstrj : 0 = 1, H =2, Si = 3
>
> while in the dump.unwrapped.lammpstrj : Si = 1, O = 2, H = 3.
>
> The problem is that I use MDAnalysis that needs the *.data file
> too. It would be troublesome if the types in the data file are not
> the same as in the dump.
>
> Is there a way to force vmd to keep the same atom types when
> saving the new coordinates ?
>
> Thanks,
>
> --
> 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 <mailto:akohlmey_at_gmail.com>
> https://urldefense.com/v3/__http://goo.gl/1wk0__;!!DZ3fjg!ogsIoeU550-xhvY_LDf6gri4GpDMc89wjeB1IyRHyastyLGa7J1Ps3s3yMPb_aOzlw$ <https://urldefense.com/v3/__http://goo.gl/1wk0__;!!DZ3fjg!ogsIoeU550-xhvY_LDf6gri4GpDMc89wjeB1IyRHyastyLGa7J1Ps3s3yMPb_aOzlw$ >
> 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
- Next message: Kiana Jahani: "Adding oxygen molecules"
- Previous message: Fujie Tang: "troubles in setting pbc on m1 mac version"
- In reply to: Axel Kohlmeyer: "Re: vmd change atom type when saving lammpstrj"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]