~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to tools/moltemplate/examples/all_atom_examples/force_field_explicit/ice_crystal/README_visualize.txt

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 ------- To view a lammps trajectory in VMD --------
 
3
 
 
4
 
 
5
1) Build a PSF file for use in viewing with VMD.
 
6
 
 
7
This step works with VMD 1.9 and topotools 1.2.  
 
8
(Older versions, like VMD 1.8.6, don't support this.)
 
9
 
 
10
 
 
11
a) Start VMD
 
12
b) Menu  Extensions->Tk Console
 
13
c) Enter:
 
14
 
 
15
(I assume that the the DATA file is called "system.data")
 
16
 
 
17
   topo readlammpsdata system.data full
 
18
   animate write psf system.psf
 
19
 
 
20
2) 
 
21
 
 
22
Later, to Load a trajectory in VMD:
 
23
 
 
24
  Start VMD
 
25
  Select menu: File->New Molecule
 
26
 -Browse to select the PSF file you created above, and load it.
 
27
  (Don't close the window yet.)
 
28
 -Browse to select the trajectory file.
 
29
  If necessary, for "file type" select: "LAMMPS Trajectory"
 
30
  Load it.
 
31
 
 
32
   ----  A note on trajectory format: -----
 
33
If the trajectory is a DUMP file, then make sure the it contains the
 
34
information you need for pbctools (see below.  I've been using this 
 
35
command in my LAMMPS scripts to create the trajectories:
 
36
 
 
37
  dump 1 all custom 500 DUMP_FILE.lammpstrj id mol type x y z ix iy iz
 
38
 
 
39
It's a good idea to use an atom_style which supports molecule-ID numbers 
 
40
so that you can assign a molecule-ID number to each atom.  (I think this 
 
41
is needed to wrap atom coordinates without breaking molecules in half.)
 
42
 
 
43
Of course, you don't have to save your trajectories in DUMP format, 
 
44
(other formats like DCD work fine)  I just mention dump files 
 
45
because these are the files I'm familiar with.
 
46
 
 
47
3) -----  Wrap the coordinates to the unit cell
 
48
          (without cutting the molecules in half)
 
49
 
 
50
a) Start VMD
 
51
b) Load the trajectory in VMD (see above)
 
52
c) Menu  Extensions->Tk Console
 
53
d) Try entering these commands:
 
54
 
 
55
    pbc wrap -compound res -all
 
56
    pbc box
 
57
 
 
58
    ----- Optional ----
 
59
    Sometimes the solvent or membrane obscures the view of the solute.
 
60
    It can help to shift the location of the periodic boundary box 
 
61
    To shift the box in the y direction (for example) do this:
 
62
 
 
63
    pbc wrap -compound res -all -shiftcenterrel {0.0 0.15 0.0}
 
64
    pbc box -shiftcenterrel {0.0 0.15 0.0}
 
65
 
 
66
    Distances are measured in units of box-length fractions, not Angstroms.
 
67
 
 
68
    Alternately if you have a solute whose atoms are all of type 1, 
 
69
    then you can also try this to center the box around it:
 
70
 
 
71
    pbc wrap -sel type=1 -all -centersel type=2 -center com
 
72
 
 
73
4) 
 
74
    You should check if your periodic boundary conditions are too small.
 
75
    To do that:
 
76
       select Graphics->Representations menu option
 
77
       click on the "Periodic" tab, and 
 
78
       click on the "+x", "-x", "+y", "-y", "+z", "-z" checkboxes.
 
79
 
 
80
5) Optional: If you like, change the atom types in the PSF file so 
 
81
   that VMD recognizes the atom types, use something like:
 
82
 
 
83
sed -e 's/   1    1      /   C    C      /g' < system.psf > temp1.psf
 
84
sed -e 's/   2    2      /   H    H      /g' < temp1.psf  > temp2.psf
 
85
sed -e 's/   3    3      /   P    P      /g' < temp2.psf  > system.psf
 
86
 
 
87
(If you do this, it might effect step 2 above.)