Next: molecule
Up: Tcl Text Commands
Previous: menu
Contents
Index
mol
Load, modify, or delete a molecule in VMD. In the following, molecule_number is a string describing which molecules are to be
affected by the command. It is one of the following: all, top,
active, inactive, displayed, on, off,
fixed, free, or one of the unique integer ID codes
assigned to the molecules when they are loaded (starting with 0).
The codes (molIDs) are not reused after a molecule is deleted, so if you,
for example, have three molecules loaded (numbered 0, 1, 2),
delete molecule with molID equal to 0, and then load another molecule,
the new molecule will have molID 3. Thus, the list of available
molecule IDs becomes (1 2 3). The index of
the molecule on this list is, among many other things,
accessible
through the molinfo command. In the above case, for example, molecule that
was loaded the last has molID equal to 3, however, it is the third
on the list of molecules, so it has the index equal to 2 (since we
start countin from 0).
The molecule representations (views)
are assigned integer number (starting with 0 for each molecule),
which appear in the list on
the Graphics form.
The representations can be added, deleted or changed with the mol
command. See also sections on
molinfo command for more ways of retrieving information about the
representations.
- new [ filename ] [ options
]:
- addfile < filename > [ options
]:
mol new is used to create a new molecule from a file; if the optional
filename parameter is omitted, a plain, ``blank'' molecule is created with
no atoms (this can be used to create a canvas for drawing user-defined
geometry). mol addfile is like mol new except that the structure
and coordinate data are loaded into the top molecule (whichever molecule was
loaded last) instead of creating a new one. Both mol new and
mol addfile accept the following set of options:
- type <type>: Specifies the file type (psf, pdb, etc.) If this
option is omitted, the filename extension is used to guess the filetype;
otherwise, it overrides what would be guessed from the filename.
- first <frame>:
- last <frame>:
- step <frame>: For files containing coordinate frames ,
specifies which frames to load. Frames are indexed starting at 0.
A step of 1 means all frames in the range will be loaded; a step of 2 means
load every other frame.
- waitfor <frames>: For files containing coordinate frames ,
specifies how many frames to load before returning; the default is 1.
If frames is less than the number of frames in the file, the rest
of the frames will be loaded in the background on subsequent VMD display
updates. If frames is
-1 or all, then all frames in all files still in progress
will be loaded at once before the command returns. Frames loaded this
way will load faster than if they are loaded in the background.
If files are still being loaded in the background when the addfile command
is issued, frames from the files in progress will be loaded first.
- volsets <set ids>: For files containing volumetric data,
specifies which data sets to load. <set ids> should be a list of
zero-based indices.
- molid: For addfile only. The molecule id of the molecule into
which the file should be loaded may be specified. It must be the last
option specified. If omitted, the default is the top molecule.
- load structure_file_type
structure_file [coordinate_file_type coordinate_file]
:
Load a new molecule from filename(s) using the given format.
If an additional coordinate file is specified, load this file as well.
New in VMD 1.8: All frames from the coordinate file will
be loaded before the command returns. If this is not desirable, use
the animate read command for more fine-grained control over how
coordinate files are loaded. Previous version of VMD loaded only one
frame before returning. The function will return the id of the newly
created molecule, or return an error if unsuccessful.
- urlload <file_type> <URL>: Load a
molecule of file_type from a given URL address. Return the id of
the newly created molecule, or an error if unsuccessful.
- pdbload <four_letter_accession_id>: Retrieve
the PDB file with the specified accession code from the RCSB web site. Returns
the id of the newly created molecule, or an error if unsuccessful.
- list: Print a one-line status summary for each molecule.
- list molecule_number: Print a one-line status summary
for each molecule matching the molecule_number. If only one
molecule matches the molecule_number, also print the representation
status for this molecule, i.e., number of representations as well as
the representation number, coloring method
, representation style
and the selection string for each of the representations.
- color coloring_method: Change the default atom coloring method setting.
- representation rep_style: Change the default rendering
method setting.
- selection select_method: Change the default atom selection setting.
- clipplane center clipplane_id rep_number molecule_number [ vector ]
- clipplane color clipplane_id rep_number molecule_number [ vector ]
- clipplane normal clipplane_id rep_number molecule_number [ vector ]
- clipplane status clipplane_id rep_number molecule_number [ boolean ]
- modcolor rep_number molecule_number coloring_method:
Change the current coloring method for the given
representation in the specified molecule.
- modmaterial rep_number molecule_number material_name:
Change the current material for the given representation in the specified
molecule.
- modstyle rep_number molecule_number rep_style:
Change the current rendering method (style) for the given
representation in the specified molecule.
- modselect rep_number molecule_number select_method: Change the current selection for the given representation
in the specified molecule.
- addrep molecule_number: Using the current default
settings for the atom selection, coloring, and rendering methods,
add a new representation to the specified molecule.
- delrep rep_number molecule_number: Deletes the
given representation from the specified molecule.
- modrep rep_number molecule_number: Using the current
default settings for the atom selection, coloring, and rendering methods,
changes the given representation to the current defaults.
- delete molecule_number: Delete molecule(s).
- active molecule_number: Make molecule(s) active.
- inactive molecule_number: Make molecule(s) inactive.
- on molecule_number: Turn molecule(s) on (make drawn).
- off molecule_number : Turn molecule(s) off (hide).
- fix molecule_number: Fix molecule(s).
- free molecule_number: Unfix molecule(s).
- top molecule_number: Set the top molecule.
- cancel molecule_number: Cancel loading trajectories.
- ssrecalc molecule_number: Recalculate secondary
- rename molecule_number newname: Rename the specified
molecule.
- repname molecule_number rep_number:
Returns the name of the given rep. This name is
guaranteed to be unique for all reps in the molecule, and will stay with
the rep even if the rep_number changes.
- repindex molecule_number name: Return the
rep_number for the rep with the given name, or -1 if no rep with
that name exists in that molecule.
- selupdate rep_number molecule_number
[onoff]: Update the selection for the specified rep each
time the molecule's timestep changes. If onoff is not
specified, returns the current update state.
- colupdate rep_number molecule_number
[onoff]: Update the calculated color for the specified rep
each time the molecule's timestep changes. If onoff is not
specified, returns the current update state.
- drawframes molecule_number rep_number [frame_specification]:
Draw multiple trajectory frames or coordinate sets simultaneously.
This setting allows the user to select one or more ranges of frames
to display simultaneously. The frame specification takes one of the
following forms now, frame_number, start:end, or
start:step:end. If the frame_specification is not
specified, the command returns the currently active frame
selection text.
- smoothrep molecule_number rep_number [n]:
Get/set the window size for on-the-fly smoothing of trajectories.
Instead of drawing the specified rep from the current coordinates, VMD
will calculate the average of the coordinates from the previous
and subsequent timesteps. If is zero then no smoothing is performed.
Note that this smoothing does not affect any label measurements, and does
not change the values of the coordinates returned by atom selections or
written to files; it only affects how the rep is drawn. Smoothing can
be especially useful in visualizing rapidly fluctuating molecules or
making movies.
- scaleminmax molecule_number rep_number [min max | auto]:
Get/set the color scale range for this rep. Normally the color scale
is automatically scaled to the minimum and maximum of the corresponding
range of data. This command overrides the autoscaled values with the
values you specify. Omit the min and max arguments to get
the current values. Use ``auto" instead of a min and max to rescale the
color scale to the maximum range again.
- showrep molecule_number rep_number [on | off]:
Get/set whether the given rep is shown or hidden. Hidden reps cannot
be picked and do not show any graphics.
- volume molecule_number <volumeset_name>
<Origin> <a> <b> <c>
#a #b #c <Data>
Add a volumetric data set to the current molecule. Origin, a, b, and c are
vectors setting the origin and the three cell vectors. #a, #b, and #c
are the number of grid points in the respective cell vector directions and
finally the data has to be provided as one list with the data following the
grid points along the c-axis fastest, then the b-axis and finally the a-axis.
Next: molecule
Up: Tcl Text Commands
Previous: menu
Contents
Index
vmd@ks.uiuc.edu