Re: [Biskit-general] Calculation of Fraction and center of mass
Brought to you by:
graik
From: Raik G. <rai...@cr...> - 2009-12-13 15:57:15
|
Hi Özer, the problem is very simple: the secondary structure as well as the surface calculation and the Pymol visualization depend on external programs that you need to install first. oze...@bo... wrote: > > Hello Sir, > > I want to ask you something about the calculation of fraction of a protein's > surface is contributed by beta sheets. > > ## add information calculated by external programs > d = B.PDBDope(m) > d.addSurfaceRacer() # MS, AS, relMS, relAS and curvature > d.addSecondaryStructure() # secondary structure from DSSP This requires a local installation of a little program called surfaceracer. See: http://biskit.pasteur.fr/install/applications/surfrace/ and also the installation of DSSP: http://biskit.pasteur.fr/install/applications/dssp Please follow the links to the installations instructions. If you are sitting on a linux or MacOSX system, this should be a rather quick exercise. > Furthermore ı wanted to calculate center of mass of a protein but ı could not. > >>>> from numpy import * >>>> import numpy.random as R >>>> import numpy as N >>>> from Biskit.gnuplot import * >>>> from Biskit import * >>>> m = PDBModel( '3D4S' ) >>>> m = m.compress( m.maskProtein() ) >>>> diff = m.xyz - m.centerOfMass() >>>> dist = sqrt( sum( diff**2, axis=1 ) ) >>>> mask = dist < 10. >>>> m_center = m.compress( mask ) > > Everything is OK but when ı write this line > >>>> pm = Pymoler() > Adding color_b.py script as a PyMol command > Adding color_b.pyc script as a PyMol command > Adding color_b.pyo script as a PyMol command > Adding rubor.py script as a PyMol command > Adding rubor.pyc script as a PyMol command > Adding rubor.pyo script as a PyMol command > This requires a local installation of Pymol (which also has to be in the search path): There are pre-compiled packages available for most linux systems. E.g. on ubuntu a simple "sudo apt-get install pymol" should be enough. See: http://pymol.sourceforge.net/ Note, all we are doing here is a nice visualization. Alternatively, you can also save the numbers in the PDB and use a molecular viewer of your own choice (VMD is a good one). Example:: >>> m['temperature_factor'] = dist >>> m.writePdb('3d4s_distance.pdb') will create a PDB file where the B-Factor column contains the distance values. >>> m_center.writePdb('3d4s_center.pdb') will create a shorter PDB file only containing the atoms within 10 A of the center of mass. Just open file number one and color it by B-Factor or superpose file number one and two with different colors to visualize the result of the cut. I hope that helps! Good luck! Raik > ı faced with some errors again. > > Traceback (most recent call last): > File "<pyshell#11>", line 1, in <module> > pm = Pymoler() > File "C:\Python25\lib\site-packages\Biskit\Pymoler.py", line 178, in __init__ > catch_err=1, catch_out=1, **kw ) > File "C:\Python25\lib\site-packages\Biskit\Executor.py", line 309, in > __init__ > self.exe.validate() > File "C:\Python25\lib\site-packages\Biskit\ExeConfig.py", line 228, in > validate > raise ExeConfigError, str(why) + ' Check %s!' % self.dat > ExeConfigError: binary pymol not found. Check > C:\Python25\lib\site-packages\Biskit\data\defaults\exe_pymol.dat! > > > Please help me as soon as possible. > > Best wishes, > > Özer Özcan > > > > > > > > > > . > -- ________________________________ Dr. Raik Gruenberg http://www.raiks.de/contact.html ________________________________ |