git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13900 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2015-08-19 14:33:40 +00:00
parent 83c1ac662d
commit 7be9bc38a2
618 changed files with 0 additions and 136681 deletions

View File

@ -1,45 +0,0 @@
NOTE: This example requires the "Al99.eam.alloy" file.
(It was not included in this directory because if its large size.)
As of 2012-11, I was able to obtain it here:
http://www.ctcms.nist.gov/~cbecker/Download/Al-YM/Al99.eam.alloy
Copy it to the directory containing this README file.
------------------------------------------------------------------------
3D fractal test
Moltemplate is useful for building larger molecular structures from
smaller pieces. Although this simulation is of no scientific value, thiss
example illustrates how to build large (many-level) heirarchical objects
(Serpinski cubes) using moltemplate. (This is also called a "Menger Sponge".)
The files in this directory demonstrate a way to build a periodic lattice of
3-dimensional Serpinski-cubes (with 3 levels of recursive self-similarity).
In this example, the basic indivisible units are 4-atoms of Aluminum
(arranged in a cubic FCC unit-cell for bulk Aluminum).
This was an arbitrary choice. The resulting construct is not stable.
(But it makes pretty movies while collapsing.)
To understand what is going on with this example, look at this file:
./moltemplate_files/elegant_inefficient_version/serpinski_cubes.lt
(This approach uses too much memory to be practical for large simulaions.
The version I actually use is here: ./moltemplate_files/serpinski_cubes.lt)
--- To build the system ---
Carry out the instructions in README_setup.sh,
to generate the LAMMPS DATA file and input scripts you need:
system.data, system.in.init, system.in.settings.
(The run.in script contains references to these files.)
--- To run LAMMPS, try a command like: ---
lmp_mpi -i run.in
or (if you have mpi installed)
mpirun -np 4 lmp_mpi -i run.in
This will create an ordinary LAMMPS dump file you can visualize with VMD
traj.lammpstrj (See README_visualize.txt)

View File

@ -1,29 +0,0 @@
# Use these commands to generate the LAMMPS input script and data file
# (and other auxilliary files):
# Create LAMMPS input files this way:
cd moltemplate_files
# run moltemplate
moltemplate.sh -atomstyle full system.lt
# This will generate various files with names ending in *.in* and *.data.
# These files are the input files directly read by LAMMPS. Move them to
# the parent directory (or wherever you plan to run the simulation).
mv -f system.in* system.data ../
# We will also need the "Al99.eam.alloy" file:
#cp -f Al99.eam.alloy ../
# This file was downloaded from:
# http://www.ctcms.nist.gov/~cbecker/Download/Al-YM/Al99.eam.alloy
# Optional:
# The "./output_ttree/" directory is full of temporary files generated by
# moltemplate. They can be useful for debugging, but are usually thrown away.
rm -rf output_ttree/
cd ../

View File

@ -1,87 +0,0 @@
------- To view a lammps trajectory in VMD --------
1) Build a PSF file for use in viewing with VMD.
This step works with VMD 1.9 and topotools 1.2.
(Older versions, like VMD 1.8.6, don't support this.)
a) Start VMD
b) Menu Extensions->Tk Console
c) Enter:
(I assume that the the DATA file is called "system.data")
topo readlammpsdata system.data full
animate write psf system.psf
2)
Later, to Load a trajectory in VMD:
Start VMD
Select menu: File->New Molecule
-Browse to select the PSF file you created above, and load it.
(Don't close the window yet.)
-Browse to select the trajectory file.
If necessary, for "file type" select: "LAMMPS Trajectory"
Load it.
---- A note on trajectory format: -----
If the trajectory is a DUMP file, then make sure the it contains the
information you need for pbctools (see below. I've been using this
command in my LAMMPS scripts to create the trajectories:
dump 1 all custom 5000 DUMP_FILE.lammpstrj id mol type x y z ix iy iz
It's a good idea to use an atom_style which supports molecule-ID numbers
so that you can assign a molecule-ID number to each atom. (I think this
is needed to wrap atom coordinates without breaking molecules in half.)
Of course, you don't have to save your trajectories in DUMP format,
(other formats like DCD work fine) I just mention dump files
because these are the files I'm familiar with.
3) ----- Wrap the coordinates to the unit cell
(without cutting the molecules in half)
a) Start VMD
b) Load the trajectory in VMD (see above)
c) Menu Extensions->Tk Console
d) Try entering these commands:
pbc wrap -compound res -all
pbc box
----- Optional ----
Sometimes the solvent or membrane obscures the view of the solute.
It can help to shift the location of the periodic boundary box
To shift the box in the y direction (for example) do this:
pbc wrap -compound res -all -shiftcenterrel {0.0 0.15 0.0}
pbc box -shiftcenterrel {0.0 0.15 0.0}
Distances are measured in units of box-length fractions, not Angstroms.
Alternately if you have a solute whose atoms are all of type 1,
then you can also try this to center the box around it:
pbc wrap -sel type=1 -all -centersel type=2 -center com
4)
You should check if your periodic boundary conditions are too small.
To do that:
select Graphics->Representations menu option
click on the "Periodic" tab, and
click on the "+x", "-x", "+y", "-y", "+z", "-z" checkboxes.
5) Optional: If you like, change the atom types in the PSF file so
that VMD recognizes the atom types, use something like:
sed -e 's/ 1 1 / C C /g' < system.psf > temp1.psf
sed -e 's/ 2 2 / H H /g' < temp1.psf > temp2.psf
sed -e 's/ 3 3 / P P /g' < temp2.psf > system.psf
(If you do this, it might effect step 2 above.)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1,64 +0,0 @@
# "AlCell" defines the 4-atom FCC unit cell
# of Aluminum (with a 4.05 angstrom spacing)
AlCell {
# AtomID MolID(IGNORE!) AtomType Charge X Y Z
write("Data Atoms") {
$atom:AlC $mol:... @atom:Al 0.0 0.000 0.000 0.000
$atom:AlX $mol:... @atom:Al 0.0 0.000 2.025 2.025
$atom:AlY $mol:... @atom:Al 0.0 2.025 0.000 2.025
$atom:AlZ $mol:... @atom:Al 0.0 2.025 2.025 0.000
}
write_once("In Init") {
units metal
atom_style full # <- Requires each atom has a MolID and Charge.
# This is not necessary. (Why use "full"?
# The "full" atom style is useful if you want to
# mix the aluminum with other molecules later.
# Otherwise, just use "atom_style atomic", and
# and remove the 2nd and 4th columns above.)
pair_style eam/alloy
}
write_once("In Settings") {
pair_coeff * * Al99.eam.alloy Al
}
write_once("Data Masses") {
@atom:Al 27.0
}
} # AlCell
# Here is an alternate way to define AlCell
# using "scale(4.05)" to select the lattice spacing:
#
#FccCell {
# write("Data Atoms") {
# $atom:AlC $mol:... @atom:Al 0.0 0.0 0.0 0.0
# $atom:AlX $mol:... @atom:Al 0.0 0.0 0.5 0.5
# $atom:AlY $mol:... @atom:Al 0.0 0.5 0.0 0.5
# $atom:AyZ $mol:... @atom:Al 0.0 0.5 0.5 0.0
# }
# write_once("Data Masses") {
# @atom:Al 27.0
# }
# write_once("In Init") {
# units metal
# atom_style full
# pair_style eam/alloy
# }
# write_once("In Settings") {
# pair_coeff * * Al99.eam.alloy Al
# }
#}
#
#AlCell = FccCell.scale(4.05)
#

View File

@ -1,64 +0,0 @@
# "AlCell" defines the 4-atom FCC unit cell
# of Aluminum (with a 4.05 angstrom spacing)
AlCell {
# AtomID MolID(IGNORE!) AtomType Charge X Y Z
write("Data Atoms") {
$atom:AlC $mol:... @atom:Al 0.0 0.000 0.000 0.000
$atom:AlX $mol:... @atom:Al 0.0 0.000 2.025 2.025
$atom:AlY $mol:... @atom:Al 0.0 2.025 0.000 2.025
$atom:AlZ $mol:... @atom:Al 0.0 2.025 2.025 0.000
}
write_once("In Init") {
units metal
atom_style full # <- Requires each atom has a MolID and Charge.
# This is not necessary. (Why use "full"?
# The "full" atom style is useful if you want to
# mix the aluminum with other molecules later.
# Otherwise, just use "atom_style atomic", and
# and remove the 2nd and 4th columns above.)
pair_style eam/alloy
}
write_once("In Settings") {
pair_coeff * * Al99.eam.alloy Al
}
write_once("Data Masses") {
@atom:Al 27.0
}
} # AlCell
# Here is an alternate way to define AlCell
# using "scale(4.05)" to select the lattice spacing:
#
#FccCell {
# write("Data Atoms") {
# $atom:AlC $mol:... @atom:Al 0.0 0.0 0.0 0.0
# $atom:AlX $mol:... @atom:Al 0.0 0.0 0.5 0.5
# $atom:AlY $mol:... @atom:Al 0.0 0.5 0.0 0.5
# $atom:AyZ $mol:... @atom:Al 0.0 0.5 0.5 0.0
# }
# write_once("Data Masses") {
# @atom:Al 27.0
# }
# write_once("In Init") {
# units metal
# atom_style full
# pair_style eam/alloy
# }
# write_once("In Settings") {
# pair_coeff * * Al99.eam.alloy Al
# }
#}
#
#AlCell = FccCell.scale(4.05)
#

View File

@ -1,34 +0,0 @@
import "al_cell.lt" # <- defines the 4-atom "AlCell" FCC Aluminum unit cell
# This approach uses the "delete" command.
# It works and it is elegant, but because the majority of atoms will be
# deleted, (and because memory is allocated for all atoms, including
# deleted atoms) this approach is not very memory efficient.
MengerCubeLvl1 {
cells = new AlCell [3].move(0.00, 0.00, 4.05)
[3].move(0.00, 4.05, 0.00)
[3].move(4.05, 0.00, 0.00)
delete cells[*][1][1]
delete cells[1][*][1]
delete cells[1][1][*]
}
MengerCubeLvl2 {
cells = new MengerCubeLvl1 [3].move(0.00, 0.00, 12.15)
[3].move(0.00, 12.15, 0.00)
[3].move(12.15, 0.00, 0.00)
delete cells[*][1][1]
delete cells[1][*][1]
delete cells[1][1][*]
}
MengerCubeLvl3 {
cells = new MengerCubeLvl2 [3].move(0.00, 0.00, 36.45)
[3].move(0.00, 36.45, 0.00)
[3].move(36.45, 0.00, 0.00)
delete cells[*][1][1]
delete cells[1][*][1]
delete cells[1][1][*]
}

View File

@ -1,34 +0,0 @@
# Periodic boundary conditions:
write_once("Data Boundary") {
0.0 218.7 xlo xhi
0.0 218.7 ylo yhi
0.0 218.7 zlo zhi
}
import "menger_cubes.lt"
cube_at_000 = new MengerCubeLvl3.move(0.0000, 0.0000, 0.0000)
cube_at_100 = new MengerCubeLvl3.move(109.35, 0.0000, 0.0000)
cube_at_010 = new MengerCubeLvl3.move(0.0000, 109.35, 0.0000)
cube_at_001 = new MengerCubeLvl3.move(0.0000, 0.0000, 109.35)
################################################################
# The next command is not necessary:
#
create_var { $mol } # <-This forces all of the Al atoms in the crystal
# # to share the same molecule ID number.
# # Molecule ID numbers are not necessary. Ignore this.
#

View File

@ -1,66 +0,0 @@
import "al_cell.lt" # <- defines the 4-atom "AlCell" FCC Aluminum unit cell
# A Menger cube is a fractal which resembles a 3x3x3 Rubik's-cube. It has a
# cube in each central face (and in the interior) removed. There are 3x3x3-7=20
# remaining sub-cubes. Each of these 20 sub-cubes is a smaller MengerCube.
# To build a MengerCube, you can list all 20 sub-cubes, or you can fill a
# 3x3x3 cube with sub-cubes and delete the interior sub-cubes. (The later
# approach is used in file "elegant_inefficient_version/menger_cubes.lt")
MengerCubeLvl1 {
# Again, a Menger-cube is constructed of 20 smaller cube-shaped objects.
# Here, the small cube-shaped objects are "AlCells" (defined in "al_cell.lt").
# I could list out the positions of all 20 AlCells, (and this would be clearer
# for the reader). However instead I built it from a combination of
# two-dimensional and three-dimensional arrays of AlCells (explained below).
# The next command creates 12 AlCells (2x2x3) at:
# (0.0, 0.0, 0.0), (0.0, 0.0, 4.05), (0.0, 0.0, 8.1)
# (0.0, 8.1, 0.0), (0.0, 8.1, 4.05), (0.0, 8.1, 8.1)
# (8.1, 8.1, 0.0), (8.1, 8.1, 4.05), (8.1, 8.1, 8.1)
cells_z = new AlCell [2].move(8.10, 0.00, 0.00)
[2].move(0.00, 8.10, 0.00)
[3].move(0.00, 0.00, 4.05)
# The next command creates 4 AlCells at: (0, 4.05, 0.0), (8.1, 4.05, 0.0),
# (0, 4.05, 8.1), (8.1, 4.05, 8.1)
cells_xz = new AlCell.move(0.00, 4.05, 0.00) [2].move(8.10, 0.0, 0.0 )
[2].move(0.0, 0.0, 8.10)
# The next command creates 4 AlCells at: (4.05, 0, 0.0), (4.05, 8.1, 0.0),
# (4.05, 0, 8.1), (4.05, 8.1, 8.1)
cells_yz = new AlCell.move(4.05, 0.00, 0.00) [2].move(0.0, 8.10, 0.0 )
[2].move(0.0, 0.0, 8.10)
}
MengerCubeLvl2 {
# Identical arrangement to MengerCube1 (with 3x larger length scales)
cells_z = new MengerCubeLvl1 [2].move(24.3, 0.00, 0.00)
[2].move(0.00, 24.3, 0.00)
[3].move(0.00, 0.00, 12.15)
cells_xz= new MengerCubeLvl1.move(0.0,12.15,0.0) [2].move(24.3, 0.0, 0.0 )
[2].move(0.0, 0.0, 24.3)
cells_yz= new MengerCubeLvl1.move(12.15,0.0,0.0) [2].move(0.0, 24.3, 0.0 )
[2].move(0.0, 0.0, 24.3)
}
MengerCubeLvl3 {
# Identical arrangement to MengerCube2 (with 3x larger length scales)
cells_z = new MengerCubeLvl2 [2].move(72.9, 0.00, 0.00)
[2].move(0.00, 72.9, 0.00)
[3].move(0.00, 0.00, 36.45)
cells_xz= new MengerCubeLvl2.move(0.0,36.45,0.0) [2].move(72.9, 0.0, 0.0 )
[2].move(0.0, 0.0, 72.9)
cells_yz= new MengerCubeLvl2.move(36.45,0.0,0.0) [2].move(0.0, 72.9, 0.0 )
[2].move(0.0, 0.0, 72.9)
}

View File

@ -1,34 +0,0 @@
# Periodic boundary conditions:
write_once("Data Boundary") {
0.0 218.7 xlo xhi
0.0 218.7 ylo yhi
0.0 218.7 zlo zhi
}
import "menger_cubes.lt"
cube_at_000 = new MengerCubeLvl3.move(0.0000, 0.0000, 0.0000)
cube_at_100 = new MengerCubeLvl3.move(109.35, 0.0000, 0.0000)
cube_at_010 = new MengerCubeLvl3.move(0.0000, 109.35, 0.0000)
cube_at_001 = new MengerCubeLvl3.move(0.0000, 0.0000, 109.35)
################################################################
# The next command is not necessary:
#
create_var { $mol } # <-This forces all of the Al atoms in the crystal
# # to share the same molecule ID number.
# # Molecule ID numbers are not necessary. Ignore this.
#

View File

@ -1,38 +0,0 @@
# ------------------------------- Initialization Section --------------------
include system.in.init
# ------------------------------- Atom Definition Section -------------------
read_data system.data
# ------------------------------- Settings Section --------------------------
include system.in.settings
# ------------------------------- Run Section -------------------------------
#
# Some of the run-settings below were stolen from:
#
# http://icme.hpc.msstate.edu/mediawiki/index.php/Uniaxial_Compression
# EQUILIBRATION
reset_timestep 0
timestep 0.001
velocity all create 300 12345 mom yes rot no
fix 1 all npt temp 300 300 1 iso 0 0 1 drag 1
# Output files
thermo 100
thermo_style custom step ke pe press
dump dCoords all custom 100 traj.lammpstrj id type x y z ix iy iz
run 20000
# Run for at least 10 picosecond (assuming 1 fs timestep)
run 10000
######################################
# SIMULATION DONE
print "All done"