Open source SASA calculations
|View on GitHub|
FreeSASA uses a subset of the Pymol select commands to give users an easy way of summing up the SASA of groups of atoms. This is done by the function freesasa_selection_new() in the C API, freesasa.selectArea() in the Python interface and the option
--select for the command line tool. All commands are case insensitive. A basic selection has a selection name, a property selector and a list of arguments
<selection-name>, <selector> <list>
aromatic, resn phe+tyr+trp+his+pro
Several selectors can be joined using boolean logic and parentheses,
<selection-name>, (<s1> <l1>) and not (<s2> <l2> or <s3> <l3>)
where s1, s2 and s3 are selectors and l1, l2 and l3 are lists. The operator
and has precedence over
or, so the second parentheses is necessary but not the first, in the example above. The selection name has to start with a letter, but it can include numbers and underscores. The name can't be longer than FREESASA_MAX_SELECTION_NAME characters.
The following property selectors are supported
resnResidue names like "ala", "arg", "du", etc
resiResidue index (positive integers)
chainChain labels (single characters)
nameAtom names, such as "ca", "c", "oxt", etc
symbolElement symbols, such as "C", "O", "Se", "Fe", etc.
A list of residues can be selected using
and similarly for the other four selectors. In addition
chain support ranges
resi 1-10 resi 1-10+20-30+35 chain A+C-E
Combining ranges with plus signs, as in the two last lines, is not allowed in Pymol but supported by FreeSASA.
If a selection list contains elements not found in the molecule that is analyzed, a warning is printed and that part of the list does not contribute to the selection. Not finding a list element can be because it specifies a residue that does not exist in the particular molecule, or because of typos. The selector does not keep a list of valid elements, residue names, etc.