Download Latest Version createSimulationBox.tar.gz (15.1 kB)
Email in envelope

Get an email when there's a new version of createSimulationBoxForLammps

Home / model
Name Modified Size InfoDownloads / Week
Parent folder
molecule.pyc 2013-12-08 1.2 kB
molecule.py 2013-12-08 1.5 kB
modelFuncions.pyc 2013-12-08 7.7 kB
modelFuncions.py 2013-12-08 8.6 kB
element.pyc 2013-12-08 421 Bytes
element.py 2013-12-08 196 Bytes
createMoleculeInRegion.pyc 2013-12-08 11.6 kB
createMoleculeInRegion.py 2013-12-08 16.1 kB
createAtomInRegion.pyc 2013-12-08 6.9 kB
createAtomInRegion.py 2013-12-08 7.5 kB
__init__.pyc 2013-12-08 140 Bytes
Totals: 11 Items   61.9 kB 0
#
# Please READ this file before you shoot out any question!
# About Author: http://missouri.academia.edu/YMao
#
==============================================================================================================================================
Quick Guide:
	usage:
	python createSimulationBox.py -i in.command -o fcc.lmp
	example execution above will read commands in in.command file and generate model in fcc.lmp
	you can easily visulize your model by running 'source tcl' throught VMD. If you have question,
	please email ymao.mu@gmail.com. I am more than happy to improve this simple software.

Note: users are free to contribute their own model to element.py or molecule.py
Important: 
	1. current models only support cubic lattice type! Fcc type will be added soon!
	2. molecule in the molecule.py has TIP3P, TIP4P, TIP5P, and H2 for test purpose only!

==============================================================================================================================================

1. Introduction:
	All the commands are similar to lammps model builing command which includes
	region, create_atom, create_box. And 'create_molecule' is a new one to create molecule 
	in simulation box.

	region: create region through keys words, block, sphere, etc.
	region: create by union or substrate

2. For Developers:
 
2.1 Important variables:

	regionDict: store all the regions claimed

	# region can be located through regionID which is specified when a region is created, as follow
	region = regionDict[regionID]
	region : store the command string when a region is created
	region : have unionList and substrateList

	boundTable: store the simulation box dimension
	massTable : store the table
	atomTable : store all the atoms
	bondTable : store all the bond 
	angleTable : store all the angle

	for molecules:
	topology information will be fully stored and syncornized which enable use to find all the rest atoms by knowing one atom id in one molecule

	-------------------------------------------------------------------------------------------------------------------------------------------

	lammpsModelData = \
		simulationBoxDict, \
		massTableDict, \
		bondTableDict, \
		angleTableDict, \
		dihedralTableDict, \ 
		improperTableDict, \
		atomTable, \
		bondTable, \
		angleTable, \
		dihedralTable, \ 
		improperTable

	massTableDict = 
			{
				"atomName":
				["atomWeight", "type"],
			...
			}

	bondTableDict = 
			{
				"bondName":
				["type"],
			...
			}

	angleTableDict = 
			{
				"angleName":
				["type"],
			...
			}

	modelLibrary = \ 
		atomDict, \
		moleculeDict

			# atom library and molecule library are embeded into this program
			atomDict = 
				{
					"Cu":
					"63.5", 
					"Fe":
					"56", 
					...
				}
			moleculeDict = 
				{
					"TIP4P":[
							"H",
							"charge",
							"x",
							"y",
							"z",
							"O",
							"charge",
							"x",
							"y",
							"z",
							"H",
							"charge",
							"x",
							"y",
							"z",
							{"bondList":{'H-O':['1-2','2-3']}},		// bond list in single molecule, also include the name of bond
							{"angleList":{'H-O-H':['1-2-3']}},		// angle list in single molecule, and also has the name of angle
							{"dihedralList":{}},					// dihedral list in ...
							{"improperList":{}}						// improper list
							], 
							...
				}

	regionData = regionIDList, regionDict, regionUnionListDict, regionSubtractionListDict

2.2 Important functions:

	createAtomInRegion(type, region, atomName), it will return a massTable, atomTable
	createMoleculeInRegion(type, region, molecueName), it will return a massTable, atomTable, bondTable, angleTable


3. How to use?
	# example usage 
	# dimension unit metal
	lattice				cubic 3.61
	region				simBox block -12 12 -12 12 0 24 units lattice
	create_box			simBox

	lattice 			cubic 4.9
	region  			copper block -12 12 -12 12 0 3 units lattice
	region  			copperSphere1 sphere -6 -6 8 2 units lattice
	region  			copperSphere2 sphere -6  6 8 2 units lattice
	region  			copperSphere3 sphere  6 -6 8 2 units lattice
	region  			copperSphere4 sphere  6  6 8 2 units lattice
	region  			water block -12 12 -12 12 3 17 units lattice

	region				water1 subtraction water copperSphere1 copperSphere2 copperSphere3 copperSphere4
	region  			copper1 union copper copperSphere1  copperSphere2 copperSphere3 copperSphere4
	create_molecules 	water1 H2 
	lattice 			cubic 3.61
	create_atoms 		copper1 Cu
Source: README, updated 2013-12-08