Subj: Questions on CNT builder & "create_box"

Dear members,

Dear members,

I have a few question on using VMD and LAMMPS. I would appreciate your help.

I am learning to use VMD/LAMMPS to set up argon flow over a cnt.
I created a cnt in VMD --> output lammps data file using topo tools --> read
it inside my lammps script file.
Then created argon atoms in side lammps script file using "create_atom"

Question: on cnt builder units.
The cnt builder takes nanometer for cnt length When writing the data out to
lammps file via topotool, it seems the (x,y,z) units are not nanometers.
I used "units real" in lammps script and built a simulation box in angstrom
units, and filled it with argon atoms.

To visualize my setup, I dumped the argon/cnt data out of lammps and
visualized them in VMD. The cnt position and size in the simulation domain
seems correct. So why did this work ?

while VMD doesn't know (or care) about units, by convention internal
units are assumed to be in angstrom. the nanotube plugin knows about
this and uses angstrom internally.

I would have expected to multiply the cnt (x,y,z) data by 10 to convert to
angstrom before reading into lammps.

nope. when the external units are known (like with cube files (which
are in atomic units) or gromacs' .trr or .xtc trajectories (which use
nanometers)), the conversion is done on the fly.

1. Could you please clarify the output length-unit of CNT builder ?

2. Based on answer to 1, I then have to be consistent with the "units xxx"
I use inside lammps script ?

topotools takes what you feed it. it just assumes that all length
units (for atoms and cell dimensions) are the same.
so with what the nanotube builder plugin creates, you can use either
"real" or "metal" units, which both use angstroms as length.

Question: on Conflict using "read_data" and "create_box" in lammps
I originally wanted to create a simulation domain, fill it with argon and
then read in the cnt data file.
I could not do it. ( I found a work around for now, but looking forward to a
more complicated setup later)

Inside my lammps script,
if I "read_data" first, then I could not use "create_box" ;
and if I used "create_box" first, then I could not "read_data" later.

Apparently, the VMD already writes out lammps data file with a simulation
domain size.
This does not allow to read in 2 or more data files, since the 1-st file
already defines a simulation box and it prevents reading in the 2-nd data

1. How can we read in more than one data file ?

you cannot. there can be only one simulation box. however, if you are
using VMD and topotools, you read in two or more "molecules" into VMD
and then ask topotools to combine them into one new "molecule" and
then write a data file for the combined topology.

check out:

or for a more complex example:

it always helps to look at the documentation. :wink:

Question : on topotool write-lammps-data file
In the cnt data file I out put, the topotools also writes out 3 lines for
(xlo,xhi), (ylo,yhi), (zlo,zhi) that forms the simulation domain size.

I removed all the 3 lines before reading cnt data file into lammps script.


Yet, when I run the lammps-script, the on-screen diagnostics show that a
default simulation domain is created ( not related to cnt size ).

1. How do I avoid this default simulation size ?

you cannot.

2. If I do this, can I then read in more than 2 files ? -

you cannot.


Dear Axel,

Thank you very much for the clarifications.