Trees | Indices | Help |
|
---|
|
1 ############################################################################### 2 # # 3 # Copyright (C) 2003-2013 Edward d'Auvergne # 4 # # 5 # This file is part of the program relax (http://www.nmr-relax.com). # 6 # # 7 # This program is free software: you can redistribute it and/or modify # 8 # it under the terms of the GNU General Public License as published by # 9 # the Free Software Foundation, either version 3 of the License, or # 10 # (at your option) any later version. # 11 # # 12 # This program is distributed in the hope that it will be useful, # 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of # 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 15 # GNU General Public License for more details. # 16 # # 17 # You should have received a copy of the GNU General Public License # 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. # 19 # # 20 ############################################################################### 21 22 # Module docstring. 23 """Module for interfacing with VMD.""" 24 25 # relax module imports. 26 import dep_check 27 from lib.errors import RelaxError, RelaxNoPdbError 28 2931 """Function for viewing the collection of molecules using VMD.""" 32 33 # Test if the module is available. 34 if not dep_check.vmd_module: 35 raise RelaxError("VMD is not available (cannot import Scientific.Visualization.VMD due to missing Numeric dependency).") 36 37 # Test if the PDB file has been loaded. 38 if not hasattr(cdp, 'structure'): 39 raise RelaxNoPdbError 40 41 # Create an empty scene. 42 cdp.vmd_scene = VMD.Scene() 43 44 # Add the molecules to the scene. 45 for i in range(len(cdp.structure.structures)): 46 cdp.vmd_scene.addObject(VMD.Molecules(cdp.structure.structures[i])) 47 48 # View the scene. 49 cdp.vmd_scene.view()50
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Nov 26 19:05:25 2013 | http://epydoc.sourceforge.net |