Apr 22, 2011

An easy way to create initial molecular system for computer simulation

Creating a single molecular structure is relatively easy if we use a molecule editor (e.g, Avogadro, Materials Studio, etc).
However, a molecular system consisting of many molecules cannot be easily prepared by those editors.
"Packmol" is a good software for readily creating such a large system.
or  http://leandro.iqm.unicamp.br/packmol/versionhistory/

1. Install "Packmol" as instructed. (it can easily be built in Cygwin64 console.)
2. Prepare component molecules in pdb, xyz, etc file format.
    (component molecules can be DPD structure.)
3. Make an input script 
4. Run "packmol < filename.inp"

An example Packmol input script is below:

# Every atom from diferent molecules will be far from each other at least 2.0 Angstroms in the system.
tolerance 2.0 

# Coordinate file types will be in pdb format (keyword not required for pdb file format, but required for tinker, xyz or moldy).
filetype xyz

# The output configuration filename
output 100water_5Na_5Cl.xyz

# The first three numbers are the minimum x, y, z coordinates for this molecules, the last three are maximum coordinates. 

structure Na.xyz
  number 5
  inside box 0. 0. 0. 20. 20. 20.
end structure

structure Cl.xyz
  number 5
  inside box 0. 0. 0. 20. 20. 20.
end structure 

structure water.xyz 
  number 100
  inside box 0. 0. 0. 20. 20. 20.
# inside box  Xmin Ymin Zmin  Xmax Ymax Zmax
# inside sphere  10.0 10.0 15.0 8.0
# inside sphere  a b c d  (a,b,c,d in a sphere equation, (x-a)^2 + (y-b)^2 + (z-c)^2 - d^2 = 0,  d is the diameter)
# inside cylinder  0.0 0.0 0.0  1.0 0.0 0.0  5.0  10.0    
# inside cylinder  x1 y1 z1  x2 y2 z2  d  l  (direction_of_line_in_vector_(x1 y1 z1  x2 y2 z2),  distance_to_the_line_(d),  length_of_cylinder_(l))

end structure

No comments:

Post a Comment