[lammps-users] Time dependent temperature in LAMMPS

Dear all,

I need help to set up a time dependent, temperature (tabulated in a file) to simulate the ultrafast melting of nanorods irradiated by a fs laser pulses.

I did some research of the existing posting and tried a few options with the code. It looks like the only way to make the temperature following my setting, the temp has to be rescaled every step (for me the fluctuation does not matter too much). The time range I am interested to follow is about 1 ns, an if I have to do rescaling every fs, the input file will seem to be very clumsy to write, modify or use. With loop option, it is not so obvious how to implement without importing all the temperature value.

I wonder if some one has tried similar thing? Thanks.

Yuelin

All the the LAMMPS thermostat fixes (nvt,langevin,rescale,berendsen) ramp the target temperature linearly in time from Tstart at the start of the run to Tstop at the end of the run, where the length of the run is specified by a subsequent ‘run nsteps’ command. You could go in and modify the code to read the target temperature schedule from a file, but I think this is not necessary. It should be sufficient to approximate your 1 ns temperature schedule by a sequence of linear ramps, each say 10 ps long (that means entering a list of one hundred temperature value in a ‘variable mytemp index t1 t2 t3…’ command, which you can write in a separate file with & line continuations and access it using the LAMMPS include command. I recommend using berendsen or langevin. They are not as formally correct as nvt, but they are more robust. Remember, when you change the target temperature, you are really just changing the ‘time average’ kinetic energy of the system. It does not make physical sense to change this too rapidly, nor can it be measured experimentally with much precision.

Aidan

I am trying to compile on blue gene, have the following complaint from the machine, please help. I svned the package. The Makefile.bgp is attached. Thanks.

Yuelin

screen dump:

[email protected]:~/lammps/src> make bgp
grep: angle_*.h: No such file or directory
grep: dihedral_*.h: No such file or directory
grep: improper_*.h: No such file or directory
make[1]: Entering directory `/gpfs/home/ylli/lammps/src/Obj_bgp'
Makefile:1: *** missing separator. Stop.
make[1]: Leaving directory `/gpfs/home/ylli/lammps/src/Obj_bgp'
make: *** [bgp] Error 2
[email protected]:~/lammps/src>

Makefile.bgp (2.4 KB)

as you can see from the error message,
the first line in your Makefile.bgp is incorrect.
that line is supposed to be a comment starting
with a pound sign.

axel.

got this error in the output

ERROR: Invalid pair style

However, example in.melt works fine.

Please help. Thanks.

Yuelin

Did you build LAMMPS with the EAM pair styles?
They are in the manybody package. Do make package-status
to see. If not, do

make yes-manybody
make machine (yours)

Steve

Steve,

thanks. This worked out!

My goal is mostly nano particle melting for now, what is the other package that I should install?

Best,

Yuelin

Ph. D
Advanced Photon Source, Argonne National Laboratory
630 252 7863
http://sector7.xor.aps.anl.gov/~ylli/

Attached is an input file that works on a windows machine, but on blue gene I got this error message,

ERROR: Illegal fix nvt/npt/nph command

Please help, thanks.

NRmelt_in1 (1.89 KB)

Attached is an input file that works on a windows machine, but on blue gene
I got this error message,

ERROR: Illegal fix nvt/npt/nph command

Please help, thanks.

please help yourself and read the documentation.

your script is not correct for the current version of the code.
your windows binary must be old.

axel.

I don't know. What is your model?

Steve

Wonder if this is a machine problem or code problem,
Here are error message

If I run your script up to the first run command,
on 32 (virtual) procs of my box, I get the following output:

LAMMPS (26 Sep 2010)
Lattice spacing in x,y,z = 4.08 4.08 4.08
Lattice spacing in x,y,z = 4.08 5.76999 5.76999
Created orthogonal box = (-261.12 -184.64 -184.64) to (261.12 184.64 184.64)
  4 by 2 by 4 processor grid
Created 50676 atoms
Created 4440 atoms
Created 4440 atoms
WARNING: No fixes defined, atoms won't move
Setting up run ...
Memory usage per processor = 1.96388 Mbytes
Step Temp E_pair E_mol TotEng Press Volume
       0 300 -230075.53 0 -227766.1
-9087.6621 1634371
...
Loop time of 0.204062 on 32 procs for 5 steps with 59556 atoms

which seems fine (same as 1 proc output). I don't see how you could
be losing atoms on the first setup, after LAMMPS just created
them.

Steve

I don't understand how you

Steve,

Thanks. I got the same output as yours at 16 nodes and below, but as I scale it up, at 32 and 64 nodes, this happened. Did you spot any obvious error in the input script? Or can it be the machine? Thanks.

Best,
Yuelin

I think it is the machine. Does BG mean Blue Gene? We've run
plenty of stuff on BG machines before. I don't
see how LAMMPS can lose atoms between when it creates
them and the setup for the first timestep. There is a communication
that is done, but it should be effectively a no-op since
when they were created they are already on the right processor.

I think the only way to debug this is to put in print statements at
various places in the code to see where they are lost. A likely
place is in the Verlet::setup() call which does the comm. But
that could only be done on your box, since I can't reproduce
the problem.

Steve

Steve,

thanks. Have you ever seen a problem like this before? Can you try my input for a higher node number like 64, 128 and see it runs?

To do the diagnostics as you suggested, which is the source file I need to look into?

Best,

Yuelin

Ph. D
Advanced Photon Source, Argonne National Laboratory
630 252 7863
http://sector7.xor.aps.anl.gov/~ylli/

I have not seen this problem before. I would sum and print
out the number of atoms at the beginning of verlet::setup() to
see if you've already lost atoms. If not, the comm routines
called from setup() are a good guess as to where it's happening.
If you've already lost atoms, then backup and see what command
is losing them. Kind of a binary search through the code
to figure out where things go bad.

Steve