This is the unstable developer branch of sasmol
Library for defining molecular objects to create simulation and analysis programs
To install:
python setup.py install
dependencies:
numpy, mocker
basic usagelibrary documentationdeveloper notes
In [1]:
import sasmol.system as system
In [2]:
molecule = system.Molecule('hiv1_gag.pdb')
In [3]:
molecule.natoms()
Out[3]:
In [4]:
molecule.number_of_frames()
Out[4]:
In [5]:
frame = 0
In [6]:
molecule.calculate_center_of_mass(frame)
Out[6]:
In [7]:
molecule.translate(frame,[88.3, 19.6, 14.7],point=True)
In [8]:
molecule.calculate_center_of_mass(frame)
Out[8]:
In [9]:
molecule.rotate(frame,'x',45*3.1515927/180.0)
In [10]:
molecule.calculate_center_of_mass(frame)
Out[10]:
In [11]:
molecule.calculate_principle_moments_of_inertia(frame)
Out[11]:
In [12]:
molecule.write_pdb('rotated_hiv1_gag.pdb',frame,'w');