Using multile fix nvt commands for mulitiple regions in a DCV-GCMD simulation system will result lammps crashed

Hi,

Lammps version: 15 May 2015

A quick question first:

In GCMC simulations, new particles are inserted with random velocities which are statistically subject to the simulation temperature. However, are these velocities subject to the Maxwell distribution as well? If not, why don’t you guys include this into GCMC package, which are primarily important for the hybrid GCMC and MD simulations.

Now, my real question is given here:

I run GCMC simulations of single site CH4 in two bulk regions, which are connected by a carbon nanotube. The pressures (chemical potential) of these two bulk regions are kept constants, say P1 and P2 ( P1> P2). Followed by MD operations for the whole system after every GCMC operation, a net flux will be generated to flow through the carbon nanotube.

For thermostating, I divide the whole system into multiple regions, and apply Nose-Hoover thermostats on the fluid molecules within different regions separately, using multiple fix nvt commands. In this case, dynamic groups are used to define the molecules located in different regions. The target regions and an example of fix nvt command are given below:

Region 1: bulk region for P1

Region 2: entrance region of the carbon nanotube

Region 3: the whole middle region of the CNT

Region 4: exit region of the carbon nanotube

Region 5 : bulk region for P2

fix 17 temp_facial1 nvt temp 300.0 300.0 100.0

However, the system crashed, as some of the particles were assigned infinite velocities, following the coordinates of these particles in the next step become infinite too, which results in a segmentation fault. I dumped all the position and velocity information for all the CH4 molecules, and the infinite velocities at the fault step is given below:

Id x y z vx vy vz

12549 24.2632 33.3514 2.43574 -0.00197544 -0.0011303 -0.0039652

12544 16.2283 10.2056 12.6682 -0.00166788 0.0020138 0.00333821

12550 40.4321 23.5891 17.1876 0.00204322 0.00116742 0.0036245

12551 37.9825 5.17415 32.9787 -0.000153452 0.00379378 -0.0028276

12562 29.1991 0.649879 465.13 -inf -inf inf

12564 11.6398 34.3959 464.202 -inf inf -inf

12555 12.1265 0.504832 480.47 -inf -inf inf

Hi,

Lammps version: 15 May 2015

A quick question first:

In GCMC simulations, new particles are inserted with random velocities
which are statistically subject to the simulation temperature. However, are
these velocities subject to the Maxwell distribution as well? If not, why
don’t you guys include this into GCMC package, which are primarily important
for the hybrid GCMC and MD simulations.

Now, my real question is given here:

I run GCMC simulations of single site CH4 in two bulk regions, which are
connected by a carbon nanotube. The pressures (chemical potential) of these
two bulk regions are kept constants, say P1 and P2 ( P1> P2). Followed by MD
operations for the whole system after every GCMC operation, a net flux will
be generated to flow through the carbon nanotube.

For thermostating, I divide the whole system into multiple regions, and
apply Nose-Hoover thermostats on the fluid molecules within different
regions separately, using multiple fix nvt commands. In this case, dynamic
groups are used to define the molecules located in different regions. The
target regions and an example of fix nvt command are given below:

Region 1: bulk region for P1

Region 2: entrance region of the carbon nanotube

Region 3: the whole middle region of the CNT

Region 4: exit region of the carbon nanotube

Region 5 : bulk region for P2

fix 17 temp_facial1 nvt temp 300.0 300.0 100.0

However, the system crashed, as some of the particles were assigned infinite
velocities, following the coordinates of these particles in the next step
become infinite too, which results in a segmentation fault. I dumped all the
position and velocity information for all the CH4 molecules, and the
infinite velocities at the fault step is given below:

Id x y z vx vy
vz

12549 24.2632 33.3514 2.43574 -0.00197544 -0.0011303 -0.0039652

12544 16.2283 10.2056 12.6682 -0.00166788 0.0020138 0.00333821

12550 40.4321 23.5891 17.1876 0.00204322 0.00116742 0.0036245

12551 37.9825 5.17415 32.9787 -0.000153452 0.00379378 -0.0028276

12562 29.1991 0.649879 465.13 -inf -inf inf

12564 11.6398 34.3959 464.202 -inf inf -inf

12555 12.1265 0.504832 480.47 -inf -inf inf

====================================================================

Then at the next step it becomes:

12549 24.2592 33.3492 2.42797 -0.00197587 -0.00113054 -0.00388476

12544 16.2249 10.2096 12.675 -0.00166824 0.00201424 0.00342021

12550 40.4361 23.5915 17.195 0.00204366 0.00116767 0.00370656

12551 37.9822 5.18173 32.9732 -0.000153485 0.0037946 -0.00274692

12562 -nan -nan -nan -nan -nan -nan

12564 -nan -nan -nan -nan -nan -nan

12555 -nan -nan -nan -nan -nan -nan

However, if I just apply a single thermostat on the whole system (fix nvt
CH4_all temp 300.0 300.0 100.0), it works fine, while all the CH4 molecules
are defined as single dynamic group (group CH4_all dynamic CH4 every 1).

So, please let me know what causes this problem.

before anybody will be seriously looking into this, you first have to
download and check with the latest patchlevel of LAMMPS. the fix gcmc
code has seen a lot of improvements and bugfixes since march and you
may be reporting a problem that has already been solved.

axel.

Regarding your first question, the terms "subject to the simulation
temperature" and "subject to the Maxwell distribution" are pretty much
interchangeable in this context. What is the distinction you are
trying to make?

Regarding your problem, do what Axel says first. If the problem
persists, please reduce it down to a small example exhibiting the same
behavior. Ideally it should have less than 100 atoms and run for less
then 1 minute.

Aidan

Dear Aidan
I have reduced my system to a very small scale, calling for less than 1 minute's run. I also tested it with the latest version, 4Aug 2015, of Lammps. However, the problem persists anyway.

Would you please take a quick look of my system. Input files can be found in the attachments.
Many thanks for your help.

Best Regards
Lang

data.conf (267 Bytes)

in-test.dcv (1.48 KB)

Dear Aidan
I have done the test using the newest version 19Aug2105 of lammps. However, the problem persists anyway.
Also I attach my input files for you to conduct short tests. Each run costs less than 30 seconds on a single processor with less than 20 particles in my system.

I appreciate your help a lot. Although I attached you my input files before, I tested that on a lower version of lammps, 4Aug2015. I think it would be helpful to let you know the problem persists in the latest version as well.

Best Regards
Lang

in-test.dcv (1.48 KB)

data.conf (267 Bytes)