Ellipsoidal particles in spherical solvent (LAMMPS): Difference between revisions

From HPC Wiki
Jump to:navigation Jump to:search
No edit summary
No edit summary
Line 69: Line 69:
Job ID                    Name            User            Time Use S Queue
Job ID                    Name            User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
------------------------- ---------------- --------------- -------- - -----
14222.flory               ellipse-lmp           user            00:00:35 R default   
14222.flory               ellipse-lmp     user            00:00:35 R default   
</pre>}}
</pre>}}



Revision as of 21:01, 20 December 2016

Ellipse sample from LAMMPS packages

Ellipsoidal particles in spherical solvent, 2d system. The example used here is identical to the version released with LAMMPS, with the following exceptions:

  • Time-step is halved.
  • Run times increased to 1,000,000.
  • Saves a movie.

Prepare Example Directory

First, make sure we are at the root of our home directory

user $cd

Now, make an example directory, and copy the ellipse example directory into it.

user $mkdir examples
user $cp -r
{{HPC-Examples-Dir}}
Parameter unnamed not defined. For correct usage see template's documention.
/lammps/ellipse examples/
user $cd examples/ellipse
user $ls
ellipse.gayberne.lmp

We also need a script to submit the job to the cluster. Lets start with the sample script in

{{HPC-Base-Dir}}
Parameter unnamed not defined. For correct usage see template's documention.

by copying it to our new ellipse example directory.

user $cp
{{HPC-Base-Dir}}
Parameter unnamed not defined. For correct usage see template's documention.
/torque-lmp.sh .
user $ls
ellipse.gayberne.lmp  torque-lmp.sh

The torque-lmp.sh script should look something like this:

FILE torque-lmp.sh(original)
#PBS -l walltime=10:00:00,mem=15gb,nodes=1:ppn=16
##PBS -M EmailAddress
##PBS -m bae
#PBS -q default
#PBS -N Jobname
#PBS -o myoutput.txt
#PBS -j oe

. $(which lmp-config)

# The LAMMPS input file must have a '.lmp' extension (e.g., mysimulation.lmp).
INPUTFILE=mysimulation

doLAMMPS

Modify Queue Submission Script

change name of job from to ellipse-lmp change INPUTFILE from mysimulation to ellipse.gayberne Should look like this:

FILE torque-lmp.sh(edited)
#PBS -l walltime=10:00:00,mem=15gb,nodes=1:ppn=16
##PBS -M EmailAddress
##PBS -m bae
#PBS -q default
#PBS -N ellipse-lmp
#PBS -o myoutput.txt
#PBS -j oe

. $(which lmp-config)

# The LAMMPS input file must have a '.lmp' extension (e.g., mysimulation.lmp).
INPUTFILE=ellipse.gayberne

doLAMMPS

Submit Job

user $qsub torque-lmp.sh
user $qstat
Job ID                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
14222.flory               ellipse-lmp      user            00:00:35 R default  

Check Results

About 4 minutes later:

user $ls -lh
total 22M
-rw-r--r-- 1 user user 1.8K Dec 20 17:25 ellipse.gayberne.lmp
-rw-rw-r-- 1 user user 1.5M Dec 20 17:29 ellipse.gayberne.out
-rw-rw-r-- 1 user user  398 Dec 20 17:26 log.cite
-rw-rw-r-- 1 user user  20M Dec 20 17:29 movie.mkv
-rw------- 1 user user  730 Dec 20 17:29 myoutput.txt
-rwxr-xr-x 1 user user  293 Dec 20 16:14 torque-lmp.sh
user $cat myoutput.txt
-------------- lmp-config (BEGIN) --------------

Start time       : Tue Dec 20 17:25:51 EST 2016

PBS_JOBID        : 14222.flory.usm.edu
Working Directory: /home/user/sims/gnu-openmpi/examples/ellipse
MPI command      : /home/user/shared/gnu-openmpi/bin/mpirun
LAMMPS command   : /home/user/shared/gnu-openmpi/bin/lmp
LAMMPS script    : /home/user/sims/gnu-openmpi/examples/ellipse/ellipse.gayberne.lmp
Processes        : 16
Controlling Node : n005.cluster.com
Nodes            : n005.cluster.com (16)

Command: mpirun  lmp -in "ellipse.gayberne.lmp" -log "ellipse.gayberne.out" -screen "none"

Stop  time       : Tue Dec 20 17:29:39 EST 2016

Elapsed time     : 0 days 00h 03m 48s

-------------- lmp-config ( END ) --------------

copy movie.mkv to your computer and watch the animation.

movie 1m23sec

1st half of movie the box is shrinking, but the movie is zooming in at same rate which is why it looks like the particles are getting larger.