Showing posts with label VMD. Show all posts
Showing posts with label VMD. Show all posts

Jul 21, 2014

How to display Hydrogen bonds

1. using VMD
(1) load *.pdb file
(2) 'graphics' menu  -->  'representations'  -->  'create Rep'
(3) in 'Selected Atoms' section, type "name N O" or "index 0 to 100"  (0 = starting atom, 100 = ending atom), and then hit 'enter key'
(4) select "Hbonds" in 'drawing method' section
(5) adjust distance cutoff and angle cutoff (e.g., 3.6, 30)

e.g.,  http://www.ks.uiuc.edu/Training/Tutorials/science/10Ala-tutorial/tutorial-html/img10.gif



2. using Avogadro
(1) load *.xyz or *.pdb file
(2) in display panel, check 'hydrogen bond"
(3) in the hydrogen bond section, set cutoffs (e.g., 3.6, 150)


Jun 16, 2011

Calculating Radius of gyration and End-to-end distance using VMD

How to calculate Radius of gyration using VMD

1. Load a molecule file in VMD (polymer.xyz)
2. (Tk console)  measure rgyr [atomselect top "name H"]
(it could be "type 1" or "index 0 to 1000" instead.  'top' is the molecule ID.)
3. Answer will appear in the console


If the molecule crosses the periodic boundary, you will need to first type:
pbc join res –first 0 –last 0
pbc unwrap

It makes sure the beads in the molecules are rearranged to remove bonds stretched across the box. (This is likely to mess up the locations of non-bonded particles, but that does not matter for radius of gyration calculations.)

http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/4674.html




How to calculate End-to-end distance using VMD

1. Load a molecule file in VMD (polymer.xyz)
2. (Menu) Mouse --> Label --> Bonds
3. (Menu) Graphics --> Labels
4. (display console) Select two atoms (end atoms of a molecule), then labels and a dotted line will show the distance between two atoms (End-to-end distance)

http://www1.pacific.edu/~mmccallu/Students/page6/page6.html

Apr 27, 2011

rearranging atoms crossed a periodic boundary

To rearrange atoms that crossed a periodic boundary:

1) load trajactory file (xyz, pdb, etc) in VMD.
2) in the VMD main console,
       pbc unwrap -all

or
2) graphics menu --> representations --> periodic --> +x, +y, +z

Apr 6, 2011

How to generate LAMMPS data file with force field parameters

To make LAMMPS data file using pdb file in VMD,

1. load pdb file (or any molecule configuration file) in VMD

2. in VMD command line, type
topo writelammpsdata filename type
# type : full, atomic, etc..

3. a data file with filename is created in VMD folder

The "topotools" is a plugin for VMD.  https://sites.google.com/site/akohlmey/software/topotools




To make LAMMPS data file with force field parameters, "msi2lmp", a LAMMPS tool (/tools/msi2lmp/) can be used.

1. build msi2lmp
make   in /tools/msi2lmp/src/

2. msi2lmp.exe, force field file (e.g., cvff.frc), car and mdf files should be in same directory.
msi2lmp.exe rootname -class I -frc force_field_name
# rootname.cat
# rootname.mdf
# -class I (e.g, cvff), -class II (e.g., CFFx)
# -frc cvff   (cvff.frc)

3. rootname.lammps05 will be generated.