| |
 |
 |  |  | Command |  | Argument |
 | Datatype |  | Default |  | Min |  | Max |
 |  |  | Format: |  | FirstSurf<Atom|Res> | |
Selection, |  | SELECTION |
 | - |
 | - |  | - |  |
 | |  | | | Type = VdW
| Molecular | Accessible | All |  | STRING |  | All |
 | - |
 | - |  |  |
 | Python: |
 | resultlist
= FirstSurf<Atom|Res>(selection1,Type=None) |  |  |  | Menu: |
 | This command is mainly useful for macros. There is no menu entry. |
 |  |  | Related: |  | Surf, ShowSurf, SurfPar
|  |  |
 | Required: |  |  |  |
 |
The FirstSurf
command allows to separate surfaces that are not connected with each other but belong to the same object. Every protein has one main outer surface,
and possibly a number of smaller inner surfaces, that enclose cavities. For each of these surfaces,
the FirstSurf command returns the number of the first atom or residue contributing to the surface as well as the area of the surface.
The surfaces are sorted by size, with the main (=largest) surface returned first. Surfaces smaller than
1 A^2 are ignored.
Example 1:
FirstSurfAtom Obj 1,accessible
List the first atom contributing to each distinct accessible surface of object
1, as well as the areas of these surfaces.
Example
2:
largest,area = FirstSurfAtom all,accessible
Assign the number of the first atom contributing to the largest accessible surface in the soup to variable
'largest' and the area of this surface to 'area'.
Example
3:
firstsurflist() = FirstSurfRes Protein,molecular
Initialize 'firstsurflist' with the numbers of the first residue contributing to each distinct molecular surface in all proteins and the respective surface areas. Residue numbers get the odd list indices
(1),(3).., surface areas the even indices (2),(4)..
Example macro:
# EXAMPLE FirstSurf
# Requires YASARA Model
# This macro writes all the surface information to log/surface_analysis.log
# and shows all distinct surfaces as separate objects with the contributing
# atoms in a different color
Clear
LoadPDB 5tim
PosObj 1,3.3,0,22.3
OriObj 1,97,175,25.4
# Keep only the protein
DelRes !Protein,Center=Yes
# Make sure that residue numbers are unique
RenumberRes all,2
HideAll
StickAll
# Perform analysis with solvent accessible surface
surftype='accessible'
SurfPar Probe=1.4,Resolution=3,Molecular=numeric
surfareasum=0.
# Get a list of the first atom in every distinct surface, plus the surface areas
surflist() = FirstSurfAtom Protein,(surftype)
surfaces = count surflist/2
# To extract partial surfaces, we need everything the entire protein in the environment
AddEnvRes Protein
# Print a summary
Console Off
RecordLog surface_analysis
for i=1 to count surflist step 2
if i==1
Print 'Main surface:'
if i==3
Print 'Secondary surfaces. If the protein does not contain fragments separate in space, these are all cavities:'
# Get number of first atom at the surface and surface area from the list
firstatom = surflist(i)
surfarea = surflist(i+1)
surfareasum = surfareasum+surfarea
# Count how many atoms contribute to this surface
surfselection = 'all with contribution to (surftype) surface touched by Atom (firstatom)'
surfatoms = CountAtom (surfselection)
# Get a list of all residues contributing to this surface
reslist() = ListRes (surfselection)
# Print surface summary
Print ' Surface ((i+1)/2): (surfatoms) atoms contribute (0.0+surfarea) A^2 of (surftype) surface area.'
text=" Residue numbers involved: "
for res in reslist
text=text+res+" "
Print (text)
# Now color and show the atoms
ColorAtom (surfselection),((i-1)*180/surfaces)
ShowAtom (surfselection)
# And create a surface object
obj=ShowSurfAtom (surfselection),(surftype),static,OutCol=AtomCol,OutAlpha=50,InCol=AtomCol,InAlpha=100
RenameObj (obj),'Surf((i+1)/2)'
Print 'Sum of surface areas >1 A^2: (0.0+surfareasum) A^2.'
surfarea = SurfAtom Protein,(surftype)
Print 'Total surface area: (0.0+surfarea) A^2.'
StopLog
 | | Figure: Result of the example macro above. |
|