Ellipsoidal particles in spherical solvent (LAMMPS): Difference between revisions
From HPC Wiki
(Created page with "==Ellipse sample from LAMMPS packages== Ellipsoidal particles in spherical solvent, 2d system. The example used here is nearly identical to the version released with LAMMPS w...") |
No edit summary |
||
Line 1: | Line 1: | ||
=Ellipse sample from LAMMPS packages= | |||
Ellipsoidal particles in spherical solvent, 2d system. The example used here is | 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. | * Time-step is halved. | ||
* Run times increased to 1,000,000. | * 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 | |||
{{Cmd|cd}} | |||
Now, make an {{Path|example}} directory, and copy the ellipse example directory into it. | |||
{{Cmd|mkdir examples|cp -r {{HPC-Examples-Dir}}/lammps/ellipse examples/|cd examples/ellipse|ls|output=<pre>ellipse.gayberne.lmp</pre>}} | |||
We also need a script to submit the job to the cluster. Lets start with the sample script in {{Path|{{HPC-Samples-Dir}}}} by copying it to our new ellipse example directory. | |||
{{Cmd|cp {{HPC-Samples-Dir}}/torque-lmp.sh .|ls|output=<pre> | |||
ellipse.gayberne.lmp torque-lmp.sh | |||
</pre>}} | |||
{{Path| | The {{Path|torque-lmp.sh}} script should look something like this: | ||
{{FileBox|lang=bash|filename=torque-lmp.sh|title=(original)|1= | {{FileBox|lang=bash|filename=torque-lmp.sh|title=(original)|1= | ||
Line 28: | Line 41: | ||
doLAMMPS | doLAMMPS | ||
}} | }} | ||
==Modify Queue Submission Script== | |||
change name of job from to {{C|ellipse-lmp}} | change name of job from to {{C|ellipse-lmp}} | ||
Line 50: | Line 65: | ||
}} | }} | ||
{{Cmd|qsub torque-lmp.sh}} | ==Submit Job== | ||
{{Cmd|qsub torque-lmp.sh|qstat|output=<pre> | |||
Job ID Name User Time Use S Queue | |||
------------------------- ---------------- --------------- -------- - ----- | |||
14222.flory ellipse-lmp user 00:00:35 R default | |||
</pre>}} | |||
==Check Results== | |||
About 4 minutes later: | About 4 minutes later: | ||
Line 87: | Line 109: | ||
</pre>}} | </pre>}} | ||
copy {{Path|movie.mkv}} to your computer and | copy {{Path|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. |
Revision as of 20:21, 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:
#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:
#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.