Any software that I can create a specific lattice shape and output the data file for LAMMPS?

Hello All,

VMD has a nanotube builder that I can use to build CNT and then using topotools I am able to produce the data file for LAMMPS. For my specific research though, I need to create a fake CNT with triangular lattice instead of hegxagonal. I can create that with mathematica but it explodes and I guess it is because I do not have the dihedral and other angle informations. My question is if you know of any preferably free software that I can use to create my own specific lattice shape nanotube and get the data file as an output?

Thank you so much

Hello,
One possibility among many: You can open a topology file created with mathematica (or any other) using VMD, detect the bonds, angles, dihedrals, and impropers using topotool, and re-export your topology with the bond information in LAMMPS format.
Best,
Simon

1 Like

Thanks a lot. I’ll try that.

Thank you Simon. It worked and I could get the required information in full format. I have another question. I need my data to be in (hybrid edpd full) format and it’s a headache if I want to prepare it in excel cause most of the time lammps does not read it anymore. Is there easier way to (software) to change the format?

I am sure there are softwares for that, but I dont know them.

Homemade scripts written in Bash or Python usually do the trick for me, it is also good to master either (or both) or these languages as they are excellent complements to simulation codes like LAMMPS. Being fluent in bash/python allows you to prepare your file and analyse your data very efficiently.

1 Like

MAke sense, thanks a lot

Can you please suggest a link to one of the scripts?

I just noticed that using tk cosole of VMD, I am getting more that reasonable numbers of angles and dihedrals. I think it double count or triple count them. Is there any way to over come that?

Simon says that you should make your own homemade scripts in Bash and/or Python. Using his scripts won’t help much because they are likely specific to his research. LAMMPS is so diverse that universally helpful tools can be very difficult to come by, so most researchers create their own scripts to handle their own combinations of pair styles, atom styles, molecules, and output formats.

If you’re new to Python, I recommend looking up some tutorials on the Numpy and/or Pandas packages, how to install them, etc. Those are the two most useful tools for scientific Python. For Bash, look up how to use for loops, if statements, ranges, globbing… There’s a lot to Bash, or any other shell, and to Python but it’s worth taking the time to learn both skills.

2 Likes

For some inspiration, please see:
https://www.lammps.org/prepost.html

1 Like

These kind of blanket statements have no value without proof. Unless you have proven that something is incorrect, nobody can understand where the problem is, figure out a solution and make a suggestion.

…and how do you know that you are correct and the software wrong?

For any software that is used by a significant number of people for a long time (and VMD/TopoTools should by now fall into that category since it exists since 2009, there have been extremely few bug reports and fixes for TopoTools in the last 5 years or so), you should make your zeroeth order approximation that the software is correct and you are not. The first step then in your situation would then be to try and understand from the very first force field principle to figure out how many bonds, angles, dihedrals there would need to be for a construct like yours. And to understand that, it is usually very helpful to start with something simpler, like just a small number of triangles in a line, then some small sheet and finally the CNT.

1 Like