I’m currently working on a simulation involving the deposition of nanoparticles onto a surface, and I was wondering whether it might be useful to introduce a new command—perhaps called nanoparticle
or particle
—similar in concept to the existing molecule
command.
The idea would be to have a way to define a nanoparticle structure once, and then reuse it in deposition simulations, similar to how molecule
is used in combination with create_atoms mol
or fix deposit mol
. However, in my case the structures I’m interested in are larger, rigid clusters (nanoparticles) rather than traditional molecules.
I attempted to modify the molecule
command and also explored integrating the XYZ reader from read_dump
, but I’m relatively new to the LAMMPS codebase and found it challenging to make this change on my own.
Would it make sense to add this functionality to LAMMPS in your opinion? If so, I’d appreciate any pointers to relevant parts of the code, or documentation that might help guide the development. Alternatively, if there’s already a way to accomplish this using existing commands or features, I’d be happy to learn about that as well.
While the command is named “molecule”, there is no limitation that would require it to only be used with molecules. Depositing rigid objects from molecule file is supported, if the corresponding options in fix deposit and fix rigid are used. It generally helps to have at least one such rigid object placed into the system (e.g. with create_atoms single) so that all the required data structures are cleanly initialized (starting from zero can sometimes expose bugs in corner cases that don’t happen for atomic systems).
That sounds needlessly complex. Why not create a converter to molecule file? No change of LAMMPS itself needed. The file format is documented here: molecule command — LAMMPS documentation and here: 4.5. File formats used by LAMMPS — LAMMPS documentation
Not in my opinion. The .xyz file format is missing some information and would have to be added on a case by case bases, e.g. the mapping of element to atom type (well, this can be achieved with the labelmap command these days).
Everything that is available in LAMMPS is documented in the manual. How you use it is a matter of your ingenuity and creativity. Nobody can anticipate any use cases. That said, I am still not clear what particular limitation of the molecule command you are encountering except for creating a suitable molecule file.
I considered using the molecule
command, but the molecule file format felt like overkill for a nanoparticle. Using a simple nanoparticle file.xyz
command seemed like a cleaner approach to me. I understood that a lot of work is needed to add such a feature so I will stick with the molecule command anyway. Thank you very much for your quick response, I really appreciate it!
Please note that most sections are optional. I think you should be able to import your particle with just a Coords and Types section.
Yeah, most sections are optional. I tried the molecule command and works fine, thank you.