Giter Club home page Giter Club logo

Comments (4)

pierrehirel avatar pierrehirel commented on July 25, 2024

Dear Sir,

Thank you for your message.

Indeed when writing a LAMMPS data file, Atomsk generates new "types" for the shells. If the atom "types" are already defined but not in increasing order, it leads to this bug. I will try to modify the code to fix this bug.

With that said, I always advise against using LAMMPS data format for intermediate files when constructing an atomic system. This file format only stores atom "types" and not necessarily chemical species, which messes things up. Use another file format (like CFG) for intermediate files, and you will have fewer problems. Use the LAMMPS data format only when writing your final output file.

I'll come back here when I solve the problem.

Best regards

from atomsk.

pierrehirel avatar pierrehirel commented on July 25, 2024

I just pushed a new version of the code. You may download it from GitHub to test it. I would appreciate if you could confirm that it solves your problem.

Best regards

from atomsk.

yfwang09 avatar yfwang09 commented on July 25, 2024

Thank you for your prompt reply! The problem has been fixed in the new version.

Regarding using other types as intermediate files, I actually tried to use .gin file as the intermediate (since .cfg does not supply the core-shell model). However, since gin does not specify the type number (only by element name), when I convert .gin file to .lmp file, the order of O and La are always reversed because the first atom in the file is O. For the example I provided earlier,

atomsk input.lmp -add-shells all output.gin
atomsk output.gin lmp

This leads to O and La with the type numbers (1,3) and (2,4), respectively. Although it is not the result I expected, I am not sure whether this should be considered a bug. Just listed here for your reference.

Thank you for your quick reply and prompt fix!

from atomsk.

pierrehirel avatar pierrehirel commented on July 25, 2024

I apologize for the delayed answer, but I understand this issue is fixed now so I will close it.

Concerning your last remark, it is not a bug. When atom "types" are not defined, Atomsk generates new types in order of appearance of the atoms. If O atoms appear first then they are assigned type 1, and so on. To fix this, just change the order of atoms, or write atom types in a file and use option "-properties" to assign types.

from atomsk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.