From csml-wiki.northwestern.edu
Jump to navigation Jump to search


VMD is

Atom Selection

Under the "Graphics"->"Representations", one can create multiple layers of representations. Each layer is independent and has its own user-defined drawing style, coloring and section of atoms.

Under the "Selections" label, one can select atoms based on the attribution keywords of the atoms. For example, in the "Selected Atoms" input, users can write

index >= 100 and vx < 1.5

This will select atoms with atom-id larger or equal to 100 and x-velocity smaller than 1.5. This command supports logical operators.

Important note: The indices used by VMD start from 0, whereas those in the dumpfiles created by LAMMPS start from 1. Therefore, specifying index = 100 in VMD actually corresponds to atom # 101 in the dumpfile.

Coloring Method

Dynamic Color Code

When assigning color code to variables that change during the simulation, such as velocity, force, polarization charge, etc., If the variable you are trying to plot is not recognized by VMD, you could trick VMD by changing the corresponding variable name in the comment line to be, for example, "vx" (this only needs to be done for the first time step). Then, VMD will interpret it as x-component of atoms velocity.

Next, in the "Coloring Method" drop-down list under "Graphical Representations", choose "Trajectory"->"Velocity". VMD will use velocity amplitude as the color value. If "vy" or "vz" is not specified, they are zero by default.

To change the color scheme, go to "Graphics"-->"Colors", under the "Color Scale" label, choose an appropriate method. The change made in color scheme here won't show immediately but in the next frame.

For example, in the RWB method, if the value range of your data is from 1.0 to 1.5 (You can set your "Color Scale Data Range" under "Graphical Representations"->"Trajectory" label), without offset, atoms with value close to 1.5 will be red, while close to 1.0 will be blue.

Note: The values for the color code are supposed to be positive. VMD takes negative value but only taking its absolute value. This becomes a problem if one has a set of data ranging -1.0 to 1.0 wishing to have -1.0 blue and 1.0 red. A trick one can do is by manipulating the dump file, add a global constant to all values (making every entry of that variable column positive), then shift the "Color Scale Data Range" also by that constant.

One color scheme applies globally to a whole "molecule". To have multiple color schemes for one molecule. Load the molecule multiple times, under the "Graphics"->"Representations" ->"Selected Molecule", do different schemes for different selection of atoms under different selected molecules.


3D Projection

Under the "Display" category, one can switch between "Perspective" (default) and "Orthographic" (recommended) views.

Click here to learn more about the difference.