View¶
View
¶
-
class
view.
View
[source]¶ Bases:
object
- View is the main module that contains the base classes that
read and write atomic information from and to external viewers such as vmd and others in the future (PyMol, etc.).
To view the coordinates the viewer needs to be open and controlled external to view / sasmol. These methods merely allow coordinates to be passed between programs.
See the following sites for the IMD format:
http://www.ks.uiuc.edu/Research/vmd/ http://www.ks.uiuc.edu/Research/namd/
This class is accessed by system objects
Examples
How to use send coordinates to VMD
>>> import sasmol.system as system >>> molecule = system.Molecule('hiv1_gag.pdb') >>> flag = False >>> molecule.send_coordinates_to_vmd(1085, flag)
Note
self parameter is not shown in the
Parameters
section in the documentation-
send_coordinates_to_vmd
(port, flag, **kwargs)[source]¶ This method opens a socket to send and receive coordinates by calling a pre-compiled C module (view_vmd).
Parameters: - port – integer : port number to communicate
- flag – boolean : True to close existing connection
- kwargs – optional future arguments
Returns: Return type: Examples
How to use send coordinates to VMD
>>> import sasmol.system as system >>> molecule = system.Molecule('hiv1_gag.pdb') >>> flag = False >>> molecule.send_coordinates_to_vmd(1085, flag)
Note
VMD needs to be open with your molecule already loaded for the coordinates to be accepted via IMD.