Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

py_molecule.C File Reference

#include "py_commands.h"
#include <ctype.h>
#include <stdlib.h>
#include "config.h"
#include "utilities.h"
#include "VMDApp.h"
#include "JString.h"
#include "Molecule.h"
#include "MoleculeList.h"

Go to the source code of this file.

Functions

void handle_legacy_keywords (PyObject *kwargs)
PyObject * py_mol_num (PyObject *self, PyObject *args)
PyObject * py_mol_listall (PyObject *self, PyObject *args)
PyObject * py_mol_exists (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_name (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_numatoms (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_new (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_fromsel (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_load (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_cancel (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_delete (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_top (PyObject *self, PyObject *args)
PyObject * py_set_top (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_read (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_write (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_numframes (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_frame (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_set_frame (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_delframe (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_dupframe (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_ssrecalc (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_rename (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_add_volumetric (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_del_volumetric (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_drm_volumetric (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_get_volumetric (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_mol_num_volumetric (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_filenames (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_filetypes (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_databases (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_accessions (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_remarks (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_periodic (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_set_periodic (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_visible (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_set_visible (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_get_physical_time (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_set_physical_time (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * initmolecule (void)

Variables

const char mol_num_doc []
const char mol_listall_doc []
const char mol_exists_doc []
const char mol_name_doc []
const char mol_numatoms_doc []
const char mol_new_doc []
const char mol_fromsel_doc []
const char mol_load_doc []
const char mol_cancel_doc []
const char mol_delete_doc []
const char get_top_doc []
const char set_top_doc []
const char mol_read_doc []
const char mol_write_doc []
const char numframes_doc []
const char get_frame_doc []
const char set_frame_doc []
const char delframe_doc []
const char dupframe_doc []
const char mol_ssrecalc_doc []
const char mol_rename_doc []
const char add_volumetric_doc []
const char del_volumetric_doc []
const char get_volumetric_doc []
const char num_volumetric_doc []
const char filenames_doc []
const char filetypes_doc []
const char databases_doc []
const char accessions_doc []
const char remarks_doc []
const char get_periodic_doc []
const char set_periodic_doc []
const char get_visible_doc []
const char set_visible_doc []
const char time_doc []
const char settime_doc []
PyMethodDef methods []
const char mol_moddoc []


Function Documentation

void handle_legacy_keywords PyObject *    kwargs
 

Definition at line 34 of file py_molecule.C.

Referenced by py_delframe, py_mol_read, and py_mol_write.

PyObject* initmolecule void   
 

Definition at line 1618 of file py_molecule.C.

References methods, and mol_moddoc.

PyObject* py_delframe PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 661 of file py_molecule.C.

References get_vmdapp, handle_legacy_keywords, VMDApp::molecule_deleteframes, NULL, and valid_molid.

PyObject* py_dupframe PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 699 of file py_molecule.C.

References get_vmdapp, VMDApp::molecule_dupframe, NULL, and valid_molid.

PyObject* py_get_accessions PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1232 of file py_molecule.C.

References as_pystring, Molecule::get_accession, get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, Molecule::num_files, result, and valid_molid.

PyObject* py_get_databases PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1189 of file py_molecule.C.

References as_pystring, Molecule::get_database, get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, Molecule::num_files, result, and valid_molid.

PyObject* py_get_filenames PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1105 of file py_molecule.C.

References as_pystring, Molecule::get_file, get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, Molecule::num_files, result, and valid_molid.

PyObject* py_get_filetypes PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1145 of file py_molecule.C.

References as_pystring, Molecule::get_type, get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, Molecule::num_files, result, and valid_molid.

PyObject* py_get_frame PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 598 of file py_molecule.C.

References as_pyint, get_vmdapp, VMDApp::molecule_frame, NULL, and valid_molid.

PyObject* py_get_periodic PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1325 of file py_molecule.C.

References Timestep::a_length, Timestep::alpha, Timestep::b_length, Timestep::beta, Timestep::c_length, Timestep::gamma, get_vmdapp, VMDApp::molecule_top, NULL, parse_timestep, and valid_molid.

PyObject* py_get_physical_time PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1495 of file py_molecule.C.

References get_vmdapp, NULL, parse_timestep, Timestep::physical_time, and valid_molid.

PyObject* py_get_remarks PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1278 of file py_molecule.C.

References as_pystring, Molecule::get_remarks, get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, Molecule::num_files, result, and valid_molid.

PyObject* py_get_top PyObject *    self,
PyObject *    args
[static]
 

Definition at line 381 of file py_molecule.C.

References as_pyint, get_vmdapp, VMDApp::molecule_top, and NULL.

PyObject* py_get_visible PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1430 of file py_molecule.C.

References get_vmdapp, VMDApp::molecule_is_displayed, VMDApp::molecule_top, NULL, and valid_molid.

PyObject* py_mol_add_volumetric PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 807 of file py_molecule.C.

References data, get_vmdapp, VMDApp::molecule_add_volumetric, NULL, size, and valid_molid.

PyObject* py_mol_cancel PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 329 of file py_molecule.C.

References get_vmdapp, VMDApp::molecule_cancel_io, NULL, and valid_molid.

PyObject* py_mol_del_volumetric PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 920 of file py_molecule.C.

References get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, BaseMolecule::num_volume_data, BaseMolecule::remove_volume_data, and valid_molid.

Referenced by py_mol_drm_volumetric.

PyObject* py_mol_delete PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 355 of file py_molecule.C.

References get_vmdapp, VMDApp::molecule_delete, NULL, and valid_molid.

PyObject* py_mol_drm_volumetric PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 949 of file py_molecule.C.

References py_mol_del_volumetric.

PyObject* py_mol_exists PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 118 of file py_molecule.C.

References as_pyint, get_vmdapp, VMDApp::molecule_valid_id, and NULL.

PyObject* py_mol_fromsel PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 228 of file py_molecule.C.

References as_pyint, atomsel_AsAtomSel, get_vmdapp, VMDApp::molecule_from_selection_list, and NULL.

PyObject* py_mol_get_volumetric PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 975 of file py_molecule.C.

References as_pyint, VolumetricData::data, data, get_vmdapp, BaseMolecule::get_volume_data, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, BaseMolecule::num_volume_data, VolumetricData::origin, result, size, valid_molid, VolumetricData::xaxis, VolumetricData::xsize, VolumetricData::yaxis, VolumetricData::ysize, VolumetricData::zaxis, and VolumetricData::zsize.

PyObject* py_mol_listall PyObject *    self,
PyObject *    args
[static]
 

Definition at line 87 of file py_molecule.C.

References as_pyint, get_vmdapp, VMDApp::molecule_id, NULL, num, and VMDApp::num_molecules.

PyObject* py_mol_load PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 274 of file py_molecule.C.

References as_pyint, get_vmdapp, VMDApp::molecule_load, VMDApp::molecule_new, NULL, FileSpec::WAIT_ALL, and FileSpec::waitfor.

PyObject* py_mol_name PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 140 of file py_molecule.C.

References as_pystring, get_vmdapp, VMDApp::molecule_name, NULL, and valid_molid.

PyObject* py_mol_new PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 192 of file py_molecule.C.

References as_pyint, get_vmdapp, VMDApp::molecule_new, and NULL.

PyObject* py_mol_num PyObject *    self,
PyObject *    args
[static]
 

Definition at line 74 of file py_molecule.C.

References as_pyint, get_vmdapp, NULL, and VMDApp::num_molecules.

PyObject* py_mol_num_volumetric PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1077 of file py_molecule.C.

References as_pyint, get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, BaseMolecule::num_volume_data, and valid_molid.

PyObject* py_mol_numatoms PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 165 of file py_molecule.C.

References as_pyint, get_vmdapp, VMDApp::molecule_numatoms, NULL, and valid_molid.

PyObject* py_mol_read PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 427 of file py_molecule.C.

References as_int, as_pyint, FileSpec::first, get_vmdapp, handle_legacy_keywords, FileSpec::last, VMDApp::molecule_load, NULL, FileSpec::nvolsets, FileSpec::setids, FileSpec::stride, FileSpec::WAIT_BACK, and FileSpec::waitfor.

PyObject* py_mol_rename PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 769 of file py_molecule.C.

References get_vmdapp, VMDApp::molecule_rename, NULL, and valid_molid.

PyObject* py_mol_ssrecalc PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 733 of file py_molecule.C.

References get_vmdapp, VMDApp::molecule_ssrecalc, NULL, and valid_molid.

PyObject* py_mol_write PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 504 of file py_molecule.C.

References as_pyint, atomsel_AsAtomSel, FileSpec::first, get_vmdapp, handle_legacy_keywords, FileSpec::last, MoleculeList::mol_from_id, VMDApp::molecule_savetrajectory, VMDApp::moleculeList, AtomSel::molid, NULL, DrawMolecule::numframes, AtomSel::on, FileSpec::selection, FileSpec::stride, valid_molid, FileSpec::WAIT_ALL, and FileSpec::waitfor.

PyObject* py_numframes PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 573 of file py_molecule.C.

References as_pyint, get_vmdapp, VMDApp::molecule_numframes, NULL, and valid_molid.

PyObject* py_set_frame PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 622 of file py_molecule.C.

References DrawMolecule::change_ts, get_vmdapp, MoleculeList::mol_from_id, VMDApp::moleculeList, NULL, DrawMolecule::numframes, DrawMolecule::override_current_frame, and valid_molid.

PyObject* py_set_periodic PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1380 of file py_molecule.C.

References Timestep::a_length, Timestep::alpha, Timestep::b_length, Timestep::beta, Timestep::c_length, Timestep::gamma, get_vmdapp, VMDApp::molecule_top, NULL, parse_timestep, and valid_molid.

PyObject* py_set_physical_time PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1526 of file py_molecule.C.

References get_vmdapp, NULL, parse_timestep, Timestep::physical_time, and valid_molid.

PyObject* py_set_top PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 393 of file py_molecule.C.

References get_vmdapp, VMDApp::molecule_make_top, NULL, and valid_molid.

PyObject* py_set_visible PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 1456 of file py_molecule.C.

References get_vmdapp, VMDApp::molecule_display, NULL, and valid_molid.


Variable Documentation

const char accessions_doc[] [static]
 

Initial value:

"Get database accession codes associated with files loaded into a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (list of str): Accession codes loaded into molecule. If no accession is\n"
"        associated with a given file loaded into the molecule, an empty\n"
"        list will be returned."

Definition at line 1224 of file py_molecule.C.

const char add_volumetric_doc[] [static]
 

Initial value:

"Add a new volumetric dataset to a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to add dataset to\n"
"    name (str): Dataset name\n"
"    size (3-tuple of int): Size of grid data in X, Y, and Z dimensions\n"
"    data (list of float): Grid data, of length xsize * ysize * zsize\n"
"    origin (3-tuple of float): (x,y,z) coordinate of grid origin, at lower left\n"
"        rear corner of grid. Defaults to (0,0,0)\n"
"    xaxis (3-tuple of float): (x,y,z) vector for X axis. Defaults to (1,0,0)\n"
"    yaxis (3-tuple of float): (x,y,z) vector for Y axis. Defaults to (0,1,0)\n"
"    zaxis (3-tuple of float): (x,y,z) vector for Z axis. Defaults to (0,0,1)"

Definition at line 795 of file py_molecule.C.

const char databases_doc[] [static]
 

Initial value:

"Get databases associated with files loaded into a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (list of str): Databases loaded into molecule. If no database is\n"
"        associated with a given file loaded into the molecule, an empty\n"
"        list will be returned"

Definition at line 1181 of file py_molecule.C.

const char del_volumetric_doc[] [static]
 

Initial value:

"Delete a volumetric dataset from a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to remove dataset from\n"
"    dataindex (int): Volumetric dataset index to delete"

Definition at line 915 of file py_molecule.C.

const char delframe_doc[] [static]
 

Initial value:

"Delete a frame or frame(s) from a loaded molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to delete frames from\n"
"    first (int): First frame to delete, inclusive. Defaults to 0.\n"
"    last (int): Last frame to delete, inclusive. Defaults to -1 (last frame)\n"
"    stride (int): Keep every Nth frame in range to delete. Defaults to 0."

Definition at line 654 of file py_molecule.C.

const char dupframe_doc[] [static]
 

Initial value:

"Duplicate a frame.\n\n"
"Args:\n"
"    molid (int): Molecule ID to duplicate frames on. If there are no loaded\n"
"        frames in this molecule, a new frame with all zero coordinates will\n"
"        be created.\n"
"    frame (int): Frame to duplicate. Defaults to -1 (current frame)"

Definition at line 692 of file py_molecule.C.

const char filenames_doc[] [static]
 

Initial value:

"Get list of all files loaded into a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (list of str): Paths to files loaded in molecule"

Definition at line 1099 of file py_molecule.C.

const char filetypes_doc[] [static]
 

Initial value:

"Get file types loaded into a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (list of str): File types loaded into molecule"

Definition at line 1139 of file py_molecule.C.

const char get_frame_doc[] [static]
 

Initial value:

"Get the current frame\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (int): Current frame of molecule"

Definition at line 592 of file py_molecule.C.

const char get_periodic_doc[] [static]
 

Initial value:

"Get the periodic cell layout\n\n"
"Args:\n"
"    molid (int): Molecule ID to query. Defaults to -1 (top molecule)\n"
"    frame (int): Frame to get box information from. Defaults to -1 (current)\n"
"Returns:\n"
"    (dict str->float): Periodic cell layout with values for keys 'a', 'b',\n"
"        and 'c' representing the lengths of the unit cell along the first,\n"
"        second, and third unit cell vectors, respectively. Values for keys\n"
"        'alpha', 'beta', and 'gamma' give the angle between sides B and C,\n"
"        A and C, and A and B, respectively."

Definition at line 1314 of file py_molecule.C.

const char get_top_doc[] [static]
 

Initial value:

"Get the ID of the top molecule\n\n"
"Returns:\n"
"    (int): Molecule ID of top molecule"

Definition at line 377 of file py_molecule.C.

const char get_visible_doc[] [static]
 

Initial value:

"Get if a molecule is visible\n\n"
"Args:\n"
"    molid (int): Molecule ID to query. Defaults to -1 (top molecule)\n"
"Returns:\n"
"    (bool): If molecule is visible"

Definition at line 1424 of file py_molecule.C.

const char get_volumetric_doc[] [static]
 

Initial value:

"Obtain a volumetric dataset loaded into a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"    dataindex (int): Volumetric dataset index to obtain\n"
"Returns:\n"
"    (4-list): Dataset, consisting of 4 lists:\n"
"        1.) A 1-D list of the values at each point\n"
"        2.) 3-tuple of int describing the x, y, z lengths.\n"
"        3.) 3-tuple of float describing the position of the origin.\n"
"        4.) 9-tuple of float describing the deltas for the x, y, and z axes)."
"\n\n"
"Example usage for export to numpy:\n"
"    >>> data, shape, origin, delta = molecule.get_volumetric(0,0)\n"
"    >>> data = np.array(data)\n"
"    >>> shape = np.array(shape)\n"
"    >>> data = data.reshape(shape, order='F')\n"
"    >>> delta = np.array(delta).reshape(3,3)\n"
"    >>> delta /= shape-1"

Definition at line 956 of file py_molecule.C.

PyMethodDef methods[] [static]
 

Definition at line 1555 of file py_molecule.C.

Referenced by initmolecule.

const char mol_cancel_doc[] [static]
 

Initial value:

"Cancel background loading of files for given molid\n\n"
"Args:\n"
"    molid (int): Molecule ID to cancel loading on"

Definition at line 325 of file py_molecule.C.

const char mol_delete_doc[] [static]
 

Initial value:

"Delete a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to delete"

Definition at line 351 of file py_molecule.C.

const char mol_exists_doc[] [static]
 

Initial value:

"Check if a molecule ID is valid\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (bool) True if molid is valid"

Definition at line 112 of file py_molecule.C.

const char mol_fromsel_doc[] [static]
 

Initial value:

"Create a new molecule from multiple atomselections\n\n"
"Args:\n"
"    sellist (list): List of atomselections to be fused into a single molecule\n"
"    name (str): Name of new molecule (optional)\n"
"Returns:\n"
"    (int): Molecule ID of created molecule"

Definition at line 221 of file py_molecule.C.

const char mol_listall_doc[] [static]
 

Initial value:

"List all valid molecule IDs\n\n"
"Returns:\n"
"    (list of int): Molids"

Definition at line 83 of file py_molecule.C.

const char mol_load_doc[] [static]
 

Initial value:

"Load a molecule from a file. Can optionally read in coordinate files as\n"
"well. Coordinate data does not have to be present in structure file\n"
"Args:\n"
"    struct_type (str): File type for structure data, or 'graphics' for\n"
"        a blank molecule to add graphics to.\n"
"    struct_file (str): Filename for structure data\n"
"    coord_type (str): File type for coordinate data. Optional.\n"
"    coord_file (str): Filename for coordinate data. Optional.\n"
"Returns:\n"
"    (int): Molecule ID of loaded molecule"

Definition at line 263 of file py_molecule.C.

const char mol_moddoc[] [static]
 

Initial value:

"Methods to interact with molecules, including loading topology, trajectory, "
"or volumetric data, query the attributes of a molecule such as the number "
"of frames or the physical time, or set the visibility of a molecule"

Definition at line 1603 of file py_molecule.C.

Referenced by initmolecule.

const char mol_name_doc[] [static]
 

Initial value:

"Get name of a given molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (str): Molecule name"

Definition at line 134 of file py_molecule.C.

const char mol_new_doc[] [static]
 

Initial value:

"Create a new molecule, with optional number of 'empty' atoms\n\n"
"Args:\n"
"    name (str): Name of new molecule\n"
"    natoms (int): Number of empty atoms in new molecule, optional.\n"
"Returns:\n"
"    (int): Molecule ID of created molecule"

Definition at line 185 of file py_molecule.C.

const char mol_num_doc[] [static]
 

Initial value:

"Get the number of loaded molecules\n\n"
"Returns:\n"
"    (int): Number of molecules"

Definition at line 70 of file py_molecule.C.

const char mol_numatoms_doc[] [static]
 

Initial value:

"Get number of atoms in a given molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (int): Number of atoms present in molecule"

Definition at line 159 of file py_molecule.C.

const char mol_read_doc[] [static]
 

Initial value:

"Read coordinate data into an existing molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to read data into\n"
"    filetype (str): File type of coordinate data\n"
"    filename (str): Path to coordinate data\n"
"    first (int): First frame to read. Defaults to 0 (first frame)\n"
"    last (int): Last frame to read, or -1 for the end. Defaults to -1\n"
"    stride (int): Frame stride. Defaults to 1 (read all frames)\n"
"    waitfor (int): Number of frames to load before returning. Defaults to 1,\n"
"        then loads asyncronously in background. Set to -1 to load all frames\n"
"    volsets (list of int): Indices of volumetric datasets to read in from\n"
"        the file. Invalid indices will be ignored."

Definition at line 414 of file py_molecule.C.

const char mol_rename_doc[] [static]
 

Initial value:

"Change the name of a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to rename\n"
"    name (str): New name for molecule"

Definition at line 764 of file py_molecule.C.

const char mol_ssrecalc_doc[] [static]
 

Initial value:

"Recalculate secondary structure for molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID\n"
"Raises:\n"
"    RuntimeError: If structure could not be calculated, usually due to the\n"
"        Stride program being unavailable"

Definition at line 726 of file py_molecule.C.

const char mol_write_doc[] [static]
 

Initial value:

"Write coordinate and topology data from a loaded molecule to a file\n\n"
"Args:\n"
"    molid (int): Molecule ID to read data into\n"
"    filetype (str): File type of coordinate data\n"
"    filename (str): Path to coordinate data\n"
"    first (int): First frame to read. Defaults to 0 (first frame)\n"
"    last (int): Last frame to read, or -1 for the end. Defaults to -1\n"
"    stride (int): Frame stride. Defaults to 1 (write all frames)\n"
"    waitfor (int): Number of frames to wait for before returning control. Defaults to -1 (wait for all frames)"
"    selection (atomsel): Atom indices to write. Defaults to all atoms."
"Returns:\n"
"    (int): Number of frames written"

Definition at line 491 of file py_molecule.C.

const char num_volumetric_doc[] [static]
 

Initial value:

"Get the number of volumetric datasets loaded into a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (int): Number of volumetric datasets loaded"

Definition at line 1071 of file py_molecule.C.

const char numframes_doc[] [static]
 

Initial value:

"Get the number of loaded frames in a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (int): Number of loaded frames"

Definition at line 567 of file py_molecule.C.

const char remarks_doc[] [static]
 

Initial value:

"Get remarks associated with files loaded into a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"Returns:\n"
"    (list of str): Remarks present in the molecule, one string per loaded\n"
"        file with remark information. Multiple remarks in the same file will\n"
"        be separated by newline (\\n) characters. If no remarks are\n"
"        associated with a given file loaded into the molecule, an empty\n"
"        string will be present in the list. If no remarks are associated\n"
"        with the molecule, an empty list will be returned."

Definition at line 1267 of file py_molecule.C.

const char set_frame_doc[] [static]
 

Initial value:

"Set the frame of a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID to set\n"
"    frame (int): New frame for molecule"

Definition at line 617 of file py_molecule.C.

const char set_periodic_doc[] [static]
 

Initial value:

"Set the periodic cell layout for a particular frame. Any number of box\n"
"attributes may be changed at a time\n\n"
"Args:\n"
"    molid (int): Molecule ID. Defaults to -1 (top molecule)\n"
"    frame (int): Frame to change box info for. Defaults to -1 (current)\n"
"    a (float): Length of unit cell along first cell vector. Optional\n"
"    b (float): Length of unit cell along second cell vector. Optional\n"
"    c (float): Length of unit cell along third cell vector. Optional\n"
"    alpha (float): Angle between cell sides B and C. Optional\n"
"    beta (float): Angle between cell sides A and C. Optional\n"
"    gamma (float): Angle between cell sides A and B. Optional"

Definition at line 1368 of file py_molecule.C.

const char set_top_doc[] [static]
 

Initial value:

"Set the top molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID of new top molecule"

Definition at line 389 of file py_molecule.C.

const char set_visible_doc[] [static]
 

Initial value:

"Set the visiblity of a molecule\n\n"
"Args:\n"
"    molid (int): Molecule ID\n"
"    visible (bool): If molecule should be visible"

Definition at line 1451 of file py_molecule.C.

const char settime_doc[] [static]
 

Initial value:

"Set the physical time value for a frame\n\n"
"Args:\n"
"    molid (int): Molecule ID to set time for.\n"
"    time (float): Time value\n"
"    frame (int): Frame to set time for. Defaults to -1 (current)\n"

Definition at line 1520 of file py_molecule.C.

const char time_doc[] [static]
 

Initial value:

"Get the physical time value for a frame, if set\n\n"
"Args:\n"
"    molid (int): Molecule ID to query\n"
"    frame (int): Frame to query. Defaults to -1 (current)\n"
"Returns:\n"
"    (float): Physical time value for frame, or 0.0f if unset"

Definition at line 1488 of file py_molecule.C.


Generated on Fri Nov 8 02:46:09 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002