[lammps] 01/02: Update/fix autopkgtest.

Anton Gladky gladk at moszumanska.debian.org
Sun May 18 10:22:26 UTC 2014


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to branch master
in repository lammps.

commit eff3471d298ca18cc60ea5bbd2ce579f5f9d4d71
Author: Anton Gladky <gladk at debian.org>
Date:   Sun May 18 11:29:39 2014 +0200

    Update/fix autopkgtest.
---
 debian/tests/colloid  |  71 ++++++++++++++++++
 debian/tests/control  |   3 +-
 debian/tests/crack    |  94 ++++++++++++++++++++++-
 debian/tests/dipole   |  61 +++++++++++++++
 debian/tests/ellipse  |  86 +++++++++++++++++++++
 debian/tests/flow     |  98 ++++++++++++++++++++++++
 debian/tests/friction | 110 +++++++++++++++++++++++++++
 debian/tests/hugo     | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 721 insertions(+), 3 deletions(-)

diff --git a/debian/tests/colloid b/debian/tests/colloid
new file mode 100755
index 0000000..cf367c5
--- /dev/null
+++ b/debian/tests/colloid
@@ -0,0 +1,71 @@
+#!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
+set -e
+
+export OMPI_MCA_orte_rsh_agent=/bin/false
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir post
+
+cat <<EOF > in.colloid
+# Big colloid particles and small LJ particles
+
+units		lj
+atom_style	sphere
+dimension	2
+
+lattice		sq 0.01
+region		box block 0 30 0 30 -0.5 0.5
+create_box	2 box
+create_atoms	1 box
+
+set		group all type/fraction 2 0.96 23984
+
+set		type 1 mass 9
+set		type 2 mass 1
+
+velocity	all create 1.44 87287 loop geom
+
+# multi neighbor and comm for efficiency
+
+neighbor	1 multi
+neigh_modify	delay 0
+communicate	multi
+
+# colloid potential
+
+pair_style	colloid 12.5
+pair_coeff	1 1  1.0 1.0 5.0 5.0 12.5
+pair_coeff	1 2  5.0 1.0 5.0 0.0 7.0
+pair_coeff	2 2 10.0 1.0 0.0 0.0 2.5
+
+fix		1 all npt temp 2.0 2.0 1.0 iso 0.0 1.0 10.0 drag 1.0 &
+	        mtk no pchain 0 tchain 1
+fix		2 all enforce2d
+
+#dump		1 all atom 1000 dump.colloid
+
+#dump		2 all image 1000 image.*.jpg type type &
+#		zoom 1.5 center d 0.5 0.5 0.5
+#dump_modify	2 pad 5 adiam 1 5.0 adiam 2 1.5
+
+#dump		3 all movie 1000 movie.mpg type type &
+#		zoom 1.5 center d 0.5 0.5 0.5
+#dump_modify	3 pad 5 adiam 1 5.0 adiam 2 1.5
+
+thermo_style	custom step temp epair etotal press vol
+thermo		1000
+
+timestep	0.005
+
+run		50000
+
+EOF
+
+mpirun -np 2 lammps < in.colloid 
+lammps < in.colloid
+echo "run: OK"
diff --git a/debian/tests/control b/debian/tests/control
index 77218b3..1fdfe6a 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1 +1,2 @@
-Tests: crack
+Tests: colloid crack dipole ellipse flow friction hugo 
+Depends: lammps
diff --git a/debian/tests/crack b/debian/tests/crack
old mode 100644
new mode 100755
index d44c7c5..d5d10b6
--- a/debian/tests/crack
+++ b/debian/tests/crack
@@ -1,7 +1,97 @@
 #!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
 set -e
 
 export OMPI_MCA_orte_rsh_agent=/bin/false
-lammps < ./examples/crack/in.crack
 
-mpirun -np 2 lammps < ./examples/crack/in.crack
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir post
+
+cat <<EOF > in.crack
+# 2d LJ crack simulation
+
+dimension	2
+boundary	s s p
+
+atom_style	atomic
+neighbor	0.3 bin
+neigh_modify	delay 5
+
+# create geometry
+
+lattice		hex 0.93
+region		box block 0 100 0 40 -0.25 0.25
+create_box	5 box
+create_atoms	1 box
+
+mass		1 1.0
+mass		2 1.0
+mass		3 1.0
+mass		4 1.0
+mass		5 1.0
+
+# LJ potentials
+
+pair_style	lj/cut 2.5
+pair_coeff	* * 1.0 1.0 2.5
+
+# define groups
+
+region	        1 block INF INF INF 1.25 INF INF
+group		lower region 1
+region		2 block INF INF 38.75 INF INF INF
+group		upper region 2
+group		boundary union lower upper
+group		mobile subtract all boundary
+
+region		leftupper block INF 20 20 INF INF INF
+region		leftlower block INF 20 INF 20 INF INF
+group		leftupper region leftupper
+group		leftlower region leftlower
+
+set		group leftupper type 2
+set		group leftlower type 3
+set		group lower type 4
+set		group upper type 5
+
+# initial velocities
+
+compute	  	new mobile temp
+velocity	mobile create 0.01 887723 temp new
+velocity	upper set 0.0 0.3 0.0
+velocity	mobile ramp vy 0.0 0.3 y 1.25 38.75 sum yes
+
+# fixes
+
+fix		1 all nve
+fix		2 boundary setforce NULL 0.0 0.0
+
+# run
+
+timestep	0.003
+thermo		200
+thermo_modify	temp new
+
+neigh_modify	exclude type 2 3
+
+#dump		1 all atom 500 dump.crack
+
+#dump		2 all image 250 image.*.jpg type type &
+#		zoom 1.6 adiam 1.5
+#dump_modify	2 pad 4
+
+#dump		3 all movie 250 movie.mpg type type &
+#		zoom 1.6 adiam 1.5
+#dump_modify	3 pad 4
+
+run		5000
+
+EOF
+
+mpirun -np 2 lammps < in.crack 
+lammps < in.crack
+echo "run: OK"
diff --git a/debian/tests/dipole b/debian/tests/dipole
new file mode 100755
index 0000000..becf494
--- /dev/null
+++ b/debian/tests/dipole
@@ -0,0 +1,61 @@
+#!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
+set -e
+
+export OMPI_MCA_orte_rsh_agent=/bin/false
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir post
+
+cat <<EOF > in.dipole
+# Point dipoles in a 2d box
+
+units		lj
+atom_style	hybrid sphere dipole
+dimension	2
+
+lattice		sq2 0.7
+region		box block 0 10 0 10 -0.5 0.5
+create_box	1 box
+create_atoms	1 box
+
+# need both mass settings due to hybrid atom style
+
+mass		1 1.0
+set		group all mass 1.0
+set		group all dipole/random 98934 0.75
+
+velocity	all create 0.0 87287 mom no
+
+pair_style	lj/cut/dipole/cut 2.5
+pair_coeff	* * 1.0 1.0
+
+neighbor	0.3 bin
+neigh_modify	delay 0
+
+fix		1 all nve/sphere update dipole
+fix		2 all enforce2d
+
+timestep	0.005
+
+compute		erot all erotate/sphere
+thermo_style	custom step temp epair c_erot etotal press
+thermo		500
+
+#dump		1 all custom 500 dump.dipole id type x y z mux muy
+
+#dump		1 all image 250 image.*.jpg mux type &
+#		zoom 1.6 adiam 1.2
+#dump_modify	1 pad 5
+
+run		10000
+
+EOF
+
+mpirun -np 2 lammps < in.dipole
+lammps < in.dipole
+echo "run: OK"
diff --git a/debian/tests/ellipse b/debian/tests/ellipse
new file mode 100755
index 0000000..ced2717
--- /dev/null
+++ b/debian/tests/ellipse
@@ -0,0 +1,86 @@
+#!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
+set -e
+
+export OMPI_MCA_orte_rsh_agent=/bin/false
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir post
+
+cat <<EOF > in.ellispe
+# GayBerne ellipsoids in LJ background fluid
+
+units	     lj
+atom_style   ellipsoid
+dimension    2
+
+lattice	     sq 0.02
+region	     box block 0 20 0 20 -0.5 0.5
+create_box   2 box
+create_atoms 1 box
+
+set	     group all type/fraction 2 0.1 95392
+set 	     type 1 mass 1.0
+set 	     type 2 mass 1.5
+set 	     type 1 shape 1 1 1
+set 	     type 2 shape 3 1 1
+set	     group all quat/random 18238
+
+compute	     rot all temp/asphere
+group	     spheroid type 1
+variable     dof equal count(spheroid)+2
+compute_modify rot extra \${dof}
+
+velocity     all create 2.4 87287 loop geom
+
+pair_style   gayberne 1.0 3.0 1.0 4.0
+pair_coeff   1 1 3.0 1.0 1 1 1 1 1 1 2.5
+pair_coeff   1 2 3.0 1.0 1 1 1 0 0 0
+pair_coeff   2 2 1.0 1.0 1 1 0.2 0 0 0
+
+neighbor     0.8 bin
+
+thermo_style custom step c_rot epair etotal press vol
+thermo	     100
+
+timestep     0.002
+
+compute	     q all property/atom quatw quati quatj quatk
+
+#dump	     1 all custom 100 dump.ellipse.gayberne &
+#	     id type x y z c_q[1] c_q[2] c_q[3] c_q[4]
+
+#dump	     2 all image 100 image.*.jpg type type &
+#	     zoom 1.6 center d 0.5 0.5 0.5
+#dump_modify  2 pad 4 adiam 1 1.0 adiam 2 2.0
+
+#dump	     3 all movie 100 movie.mpg type type &
+#	     zoom 1.6 center d 0.5 0.5 0.5
+#dump_modify  3 pad 4 adiam 1 1.0 adiam 2 2.0
+
+fix	     1 all npt/asphere temp 2.0 2.0 0.1 iso 0.0 1.0 1.0 &
+	       mtk no pchain 0 tchain 1
+fix	     2 all enforce2d
+
+compute_modify 1_temp extra \${dof}
+
+# equilibrate to shrink box around dilute system
+
+run	     2000
+
+# run dynamics on dense system
+
+unfix	     1
+fix	     1 all nve/asphere
+
+run	     2000
+
+EOF
+
+mpirun -np 2 lammps < in.ellispe
+lammps < in.ellispe
+echo "run: OK"
diff --git a/debian/tests/flow b/debian/tests/flow
new file mode 100755
index 0000000..45e82af
--- /dev/null
+++ b/debian/tests/flow
@@ -0,0 +1,98 @@
+#!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
+set -e
+
+export OMPI_MCA_orte_rsh_agent=/bin/false
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir post
+
+cat <<EOF > in.flow
+# 2-d LJ flow simulation
+
+dimension	2
+boundary	p s p
+
+atom_style	atomic
+neighbor	0.3 bin
+neigh_modify	delay 5
+
+# create geometry
+
+lattice		hex 0.7
+region		box block 0 20 0 10 -0.25 0.25
+create_box	3 box
+create_atoms	1 box
+
+mass		1 1.0
+mass		2 1.0
+mass		3 1.0
+
+# LJ potentials
+
+pair_style	lj/cut 1.12246
+pair_coeff	* * 1.0 1.0 1.12246
+
+# define groups
+
+region	     1 block INF INF INF 1.25 INF INF
+group	     lower region 1
+region	     2 block INF INF 8.75 INF INF INF
+group	     upper region 2
+group	     boundary union lower upper
+group	     flow subtract all boundary
+
+set	     group lower type 2
+set	     group upper type 3
+
+# initial velocities
+
+compute	     mobile flow temp
+velocity     flow create 1.0 482748 temp mobile
+fix	     1 all nve
+fix	     2 flow temp/rescale 200 1.0 1.0 0.02 1.0
+fix_modify   2 temp mobile
+
+# Couette flow
+
+velocity     lower set 0.0 0.0 0.0
+velocity     upper set 3.0 0.0 0.0
+fix	     3 boundary setforce 0.0 0.0 0.0
+fix	     4 all enforce2d
+
+# Poiseuille flow
+
+#velocity     boundary set 0.0 0.0 0.0
+#fix	     3 lower setforce 0.0 0.0 0.0
+#fix	     4 upper setforce 0.0 NULL 0.0
+#fix	     5 upper aveforce 0.0 -1.0 0.0
+#fix	     6 flow addforce 0.5 0.0 0.0
+#fix	     7 all enforce2d
+
+# Run
+
+timestep	0.003
+thermo		500
+thermo_modify	temp mobile
+
+#dump		1 all atom 500 dump.flow
+
+#dump		2 all image 100 image.*.jpg type type &
+#		zoom 1.6 adiam 1.2
+#dump_modify	2 pad 5
+
+#dump		3 all movie 100 movie.mpg type type &
+#		zoom 1.6 adiam 1.2
+#dump_modify	3 pad 5
+
+run		10000
+
+EOF
+
+mpirun -np 2 lammps < in.flow
+lammps < in.flow
+echo "run: OK"
diff --git a/debian/tests/friction b/debian/tests/friction
new file mode 100755
index 0000000..540d1c2
--- /dev/null
+++ b/debian/tests/friction
@@ -0,0 +1,110 @@
+#!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
+set -e
+
+export OMPI_MCA_orte_rsh_agent=/bin/false
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir post
+
+cat <<EOF > in.friction
+# 2d friction simulation
+
+dimension	2
+boundary	p s p
+
+atom_style	atomic
+neighbor	0.3 bin
+neigh_modify	delay 5
+
+# create geometry
+
+lattice		hex 0.9
+region		box block 0 50 0 22 -0.25 0.25
+create_box	4 box
+
+mass		1 1.0
+mass		2 1.0
+mass		3 1.0
+mass		4 1.0
+
+# atom regions
+
+region          lo-fixed block INF INF INF 1.1 INF INF
+region          lo-slab block INF INF INF 7 INF INF
+region          above-lo block INF INF INF 7 INF INF side out
+region          hi-fixed block INF INF 20.9 INF INF INF
+region          hi-slab block INF INF 15 INF INF INF
+region          below-hi block INF INF 15 INF INF INF side out
+region		lo-asperity sphere 32 7 0 8
+region		hi-asperity sphere 18 15 0 8
+region		lo-half-sphere intersect 2 lo-asperity above-lo
+region		hi-half-sphere intersect 2 hi-asperity below-hi
+
+# create 2 surfaces with asperities
+
+create_atoms	1 region lo-slab
+create_atoms	1 region hi-slab
+create_atoms	2 region lo-half-sphere
+create_atoms	3 region hi-half-sphere
+
+# LJ potentials
+
+pair_style	lj/cut 2.5
+pair_coeff	* * 1.0 1.0 2.5
+
+# define groups
+
+group	        lo region lo-slab
+group		lo type 2
+group		hi region hi-slab
+group		hi type 3
+group		lo-fixed region lo-fixed
+group		hi-fixed region hi-fixed
+group		boundary union lo-fixed hi-fixed
+group		mobile subtract all boundary
+
+set		group lo-fixed type 4
+set		group hi-fixed type 4
+
+# initial velocities
+
+compute         new mobile temp/partial 0 1 0
+velocity	mobile create 0.1 482748 temp new
+velocity	hi set 1.0 0.0 0.0 sum yes
+
+# fixes
+
+fix		1 all nve
+fix		2 boundary setforce 0.0 0.0 0.0
+fix		3 mobile temp/rescale 200 0.1 0.1 0.02 1.0
+fix_modify	3 temp new
+fix             4 all enforce2d
+
+# Run
+
+timestep	0.0025
+thermo		1000
+thermo_modify	temp new
+
+#dump		1 all atom 500 dump.friction
+
+#dump		2 all image 500 image.*.jpg type type &
+#		zoom 1.6 adiam 1.5
+#dump_modify	2 pad 5
+
+#dump		3 all movie 500 movie.mpg type type &
+#		zoom 1.6 adiam 1.5
+#dump_modify	3 pad 5
+
+run		20000
+
+EOF
+
+mpirun -np 2 lammps < in.friction 
+lammps < in.friction
+echo "run: OK"
diff --git a/debian/tests/hugo b/debian/tests/hugo
new file mode 100755
index 0000000..76f4eb6
--- /dev/null
+++ b/debian/tests/hugo
@@ -0,0 +1,201 @@
+#!/bin/sh
+# autopkgtest check
+# (C) 2014 Anton Gladky
+
+set -e
+
+export OMPI_MCA_orte_rsh_agent=/bin/false
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+mkdir post
+
+cat <<EOF > in.hugo
+# This script reproduces stress trajectories from Fig. 1 in
+# Ravelo, Holian, Germann, and Lomdahl, PRB 70 014103 (2004)
+#
+# Three thermostatting scenarios are visited: undamped (nodrag), 
+# damped (drag) and Nose-Hoover chain (nhchains).
+#
+# The axial and shear stress trajectories are printed to the
+# file "stress_vs_t.dat". For the damped case, the original figure
+# seems to be a plot of 2*tau, rather than tau.
+#
+# The script also demonstrates how to 
+# orient a crystal along <110>,
+# and how to use the lj/cubic pair style. 
+
+units           lj
+boundary        p p p
+
+atom_style	atomic
+
+# Set up FCC lattice with z axis along <110>
+
+lattice                fcc 1.4142136 &
+                       orient x 0 0 1 &
+                       orient y 1 -1 0 &
+                       orient z 1 1 0
+
+region         mycell block 0.0 5.0 0.0 5.0 0.0 5.0 units lattice
+create_box     1 mycell
+mass           * 1.0
+create_atoms   1 box
+
+# Using units of Rmin, so sigma = 2^-1/6 = 0.8908987
+
+pair_style lj/cubic
+pair_coeff * * 1.0 0.8908987
+
+# Relax box dimensions
+
+fix             3 all box/relax aniso 0.0 vmax 1.0e-4 nreset 100
+
+thermo          100
+thermo_style	custom step temp pe etotal pxx pyy pzz lx ly lz 
+
+min_modify      line quadratic
+minimize	0.0 1.0e-6 10000 100000
+
+# Define initial velocity
+
+velocity        all create 0.01 87287 mom yes rot yes dist gaussian
+write_restart restart.equil
+
+# Start Run #1
+
+log log.nodrag
+
+clear
+read_restart restart.equil
+
+neighbor        0.2 bin
+neigh_modify    every 1 delay 0 check yes
+timestep        0.001
+reset_timestep 0
+
+# Pzz = 40.0, drag/damping term off
+
+fix myhug all nphug temp 1.0 1.0 10.0 z 40.0 40.0 70.0 drag 0.0 tchain 1 pchain 0 
+
+# Specify reference state from paper, times 1000 atoms
+
+fix_modify myhug e0 -6334.0 p0 0.0 v0 680.73519
+
+# Add fix energy to ouput etotal
+ 
+fix_modify myhug energy yes 
+
+# Define output
+
+variable dele  equal f_myhug[1] # energy delta [temperature]
+variable us    equal f_myhug[2] # shock velocity [distance/time]
+variable up    equal f_myhug[3] # particle velocity [distance/time]
+variable pzz   equal pzz  # axial stress
+variable tau equal 0.5*(pzz-0.5*(pxx+pyy)) # shear stress
+variable time equal dt*step
+
+thermo          1000
+thermo_style custom step temp ke epair etotal pzz v_tau lz f_myhug v_dele v_us v_up
+
+fix stress all print 10 "\${time} \${pzz} \${tau} " screen no append stress_vs_t.dat title '#time pzz tau (no drag)'
+
+#dump		id all atom 500 dump.hugoniostat
+
+#dump		2 all image 500 image.*.jpg type type &
+#		axes yes 0.8 0.02 view 60 -30
+#dump_modify	2 pad 5
+
+#dump		3 all movie 500 movie.mpg type type &
+#		axes yes 0.8 0.02 view 60 -30
+#dump_modify	3 pad 5
+
+run		10000
+
+# Start Run #2
+
+log log.drag
+
+clear
+read_restart restart.equil
+
+neighbor        0.2 bin
+neigh_modify    every 1 delay 0 check yes
+timestep        0.001
+reset_timestep 0
+
+# Pzz = 40.0, drag/damping term on
+
+fix myhug all nphug temp 1.0 1.0 1.0 z 40.0 40.0 70.0 drag 200.0 tchain 1 pchain 0 
+
+# Specify reference state from paper, times 1000 atoms
+
+fix_modify myhug e0 -6334.0 p0 0.0 v0 680.73519
+
+# Add fix energy to ouput etotal
+ 
+fix_modify myhug energy yes 
+
+# Define output
+
+variable dele  equal f_myhug[1] # energy delta [temperature]
+variable us    equal f_myhug[2] # shock velocity [distance/time]
+variable up    equal f_myhug[3] # particle velocity [distance/time]
+variable pzz   equal pzz  # axial stress
+variable tau equal 0.5*(pzz-0.5*(pxx+pyy)) # shear stress
+variable time equal dt*step
+
+thermo          1000
+thermo_style custom step temp ke epair etotal pzz v_tau lz f_myhug v_dele v_us v_up
+
+fix stress all print 10 "\${time} \${pzz} \${tau} " screen no append stress_vs_t.dat title '#time pzz tau (with drag)'
+
+run		10000
+
+# Start Run #3
+
+log log.nhchains
+
+clear
+read_restart restart.equil
+
+neighbor        0.2 bin
+neigh_modify    every 1 delay 0 check yes
+timestep        0.001
+reset_timestep 0
+
+# Pzz = 40.0, drag/damping term off, Nose-Hoover chains
+
+fix myhug all nphug temp 1.0 1.0 1.0 z 40.0 40.0 70.0
+
+# Specify reference state from paper, times 1000 atoms
+
+fix_modify myhug e0 -6334.0 p0 0.0 v0 680.73519
+
+# Add fix energy to ouput etotal
+ 
+fix_modify myhug energy yes 
+
+# Define output
+
+variable dele  equal f_myhug[1] # energy delta [temperature]
+variable us    equal f_myhug[2] # shock velocity [distance/time]
+variable up    equal f_myhug[3] # particle velocity [distance/time]
+variable pzz   equal pzz  # axial stress
+variable tau equal 0.5*(pzz-0.5*(pxx+pyy)) # shear stress
+variable time equal dt*step
+
+thermo          1000
+thermo_style custom step temp ke epair etotal pzz v_tau lz f_myhug v_dele v_us v_up
+
+fix stress all print 10 "\${time} \${pzz} \${tau} " screen no append stress_vs_t.dat title '#time pzz tau (Nose-Hoover chain)'
+
+run		10000
+
+
+EOF
+
+mpirun -np 2 lammps < in.hugo
+lammps < in.hugo
+echo "run: OK"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/lammps.git



More information about the debian-science-commits mailing list