next up previous contents
Next: DrawMolecule Up: BaseMolecule Previous: Virtual member functions

Method of use

A new molecule is first created by using `new' with the proper subclass of Molecule (Molecule is the `standard' class to use for all molecule objects in VMD; classes derived from Molecule are specialized to read in data from different sources, while classes above the Molecule level only deal with some of the information required to store and display and animate a structure.). Then, after the new instance is assigned to a Molecule pointer, then the create() virtual function should be called. This will actually result in all the action being done, for example data files will be read or network connections will be established. The version of create() in BaseMolecule should be called after the molecule has been read in by the derived classes. It analyzes the structure and finds the backbone bonds, fragments, etc. When create() is finished, the molecule is ready to go. If create() does not return TRUE, however, the creation failed (i.e. the files could not be opened), and the new molecule will still be empty.



Justin Gullingsrud
Tue Apr 6 09:26:48 CDT 1999