Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help
Special pages
SBGrid Resources
SBGrid Consortium
SBGrid Data Bank
Software Webinars
PyMOL Webinar
PyMOL Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Get area
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Examples = == Example 1 - starting with a complex in a single file == <source lang="python"> # load complex # Haemoglobin in this example illustrates careful use of selection algebra load 2HHB.pdb # create objects for alpha1, beta1 and alpha1,beta1 pair of subunits create alpha1, 2HHB and chain A create beta1, 2HHB and chain B create ab1, 2HHB and chain A+B # get hydrogens onto everything (NOTE: must have valid valences on e.g. small organic molecules) h_add # make sure all atoms including HETATM within an object occlude one another, but ignore solvent flag ignore, none flag ignore, solvent # use solvent-accessible surface with high sampling density set dot_solvent, 1 set dot_density, 3 # measure the components individually storing the results for later alpha1_area=cmd.get_area("alpha1") beta1_area=cmd.get_area("beta1") # measure the alpha1,beta1 pair ab1_area=cmd.get_area("ab1") # now print results and do some maths to get the buried surface print alpha1_area print beta1_area print ab1_area print (alpha1_area + beta1_area) - ab1_area </source> == Example 2 - starting with two components in separate files == <source lang="python"> # load components separately load my_ligand.pdb load my_target.pdb # get hydrogens onto everything (NOTE: must have valid valences on the ligand...) h_add # make sure all atoms including HETATM within an object occlude one another but ignore solvent flag ignore, none flag ignore, solvent # use solvent-accessible surface with high sampling density set dot_solvent, 1 set dot_density, 3 # measure the components individually ligand_area=cmd.get_area("my_ligand") target_area=cmd.get_area("my_target") # create the complex create my_complex, my_ligand my_target # measure the complex complex_area=cmd.get_area("my_complex") # now print results print ligand_area print target_area print complex_area print (ligand_area + target_area) - complex_area </source> ==Example 3 - using load_b to get surface area per atom == <source lang="python"> # example usage of load_b # select some organic small molecule select ligand, br. first organic # get its area and load it into it's b-factor column get_area ligand, load_b=1 # print out the b-factor/areas per atom iterate ligand, print b </source> ==Example 4 - using a Python script to compute the SASA for individual residues== <source lang="python"> import __main__ __main__.pymol_argv = ['pymol','-qc'] import pymol from pymol import cmd, stored pymol.finish_launching() cmd.set('dot_solvent', 1) cmd.set('dot_density', 3) cmd.load('file.pdb') # use the name of your pdb file stored.residues = [] cmd.iterate('name ca', 'stored.residues.append(resi)') sasa_per_residue = [] for i in stored.residues: sasa_per_residue.append(cmd.get_area('resi %s' % i)) print sum(sasa_per_residue) print cmd.get_area('all') # just to check that the sum of sasa per residue equals the total area </source>
Summary:
Please note that all contributions to PyMOL Wiki are considered to be released under the GNU Free Documentation License 1.2 (see
PyMOL Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Get area
(section)
Add topic