Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
011f7a63
Commit
011f7a63
authored
7 years ago
by
Gerardo Tauriello
Browse files
Options
Downloads
Patches
Plain Diff
Cleaned up Processor doc and exports.
parent
f779c422
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/conop/doc/connectivity.rst
+86
-51
86 additions, 51 deletions
modules/conop/doc/connectivity.rst
modules/conop/pymod/export_processor.cc
+7
-3
7 additions, 3 deletions
modules/conop/pymod/export_processor.cc
with
93 additions
and
54 deletions
modules/conop/doc/connectivity.rst
+
86
−
51
View file @
011f7a63
...
@@ -40,76 +40,112 @@ Processors
...
@@ -40,76 +40,112 @@ Processors
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
The exact behaviour for a processor is implementation-specific. So far, two
The exact behaviour for a processor is implementation-specific. So far, two
classes implement the processor interface: A heuristic and a rule-based processor.
classes implement the processor interface: A heuristic and a rule-based
The processor mainly differ in the source of their connectivity information. The
processor. The processor mainly differ in the source of their connectivity
Heuristicprocessor uses a hard-coded heuristic connectivity table for the 20
information. The Heuristicprocessor uses a hard-coded heuristic connectivity
standard amino acids as well as nucleotides.For other compounds such as ligands
table for the 20 standard amino acids as well as nucleotides.For other
the HeuristicProcessor runs a distance-based connectivity algorithm that connects
compounds such as ligands the HeuristicProcessor runs a distance-based
two atoms if they are closer than a certain threshold. The RuleBasedProcessor
connectivity algorithm that connects two atoms if they are closer than a certain
uses a connectivity library containing all molecular components present in the
threshold. The RuleBasedProcessor uses a connectivity library containing all
PDB files on PDB.org. The library can easily be extended with custom
molecular components present in the PDB files on PDB.org. The library can easily
connectivity information, if required. If a :doc:`compound library <compoundlib>` is
be extended with custom connectivity information, if required. If a
present, the :class:`RuleBasedProcessor` is enabled by default, otherwise the
:doc:`compound library <compoundlib>` is present, the
:class:`RuleBasedProcessor` is enabled by default, otherwise the
:class:`HeuristicProcessor` is used as a fallback.
:class:`HeuristicProcessor` is used as a fallback.
The Processor base class
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. class:: Processor
.. class:: Processor
.. attribute:: c
onnect
.. attribute:: c
heck_bond_feasibility
Whether to connect atoms by bonds. Enabled by default. This also sets the
Whether an additional bond feasibility check is performed. Disabled by
:attr:`~ost.mol.ResidueHandle.is_protein` property of residues when peptide
default. If turned on, atoms are only connected by bonds if they are within
bonds are created. Turn this off if you would like to speed up the loading
a reasonable distance (as defined by :func:`IsBondFeasible`).
process and do not require connectivity information to be present in your
structures.
:type: :class:`bool`
:type: :class:`bool`
.. attribute::
zero_occ_treatment
.. attribute::
assign_torsions
Controls the behaviour of importing atoms with zero occupancy. By default, this
Whether backbone torsions should be added to the backbone. Enabled by
is set to silent.
default. If turned on, PHI, PSI and OMEGA torsions are assigned to the
peptide residues. See also :func:`AssignBackboneTorsions`.
:type: :class:`
str
`
:type: :class:`
bool
`
.. attribute:: c
heck_bond_feasibility
.. attribute:: c
onnect
Whether
an additional bond feasibility check is performed. Disabled by default.
Whether
to connect atoms by bonds. Enabled by default. Turn this off if you
Turn this on, if you would like to connect atoms by bonds only if they are
would like to speed up the loading process and do not require connectivity
within a reasonable distance.
information to be present in your structures. Note though that
See also :func:`IsBondFeasible`
.
:attr:`peptide_bonds` may be ignored if this is turned off
.
:type: :class:`bool`
:type: :class:`bool`
.. attribute::
assign_torsi
ons
.. attribute::
peptide_b
on
d
s
Whether backbone torsions should be added to the backbone. Disabled by default.
Whether to connect residues by peptide bonds. Enabled by default. This also
Set to true, to assign PHI, PSI and OMEGA torsions to the peptide residues.
sets the :attr:`~ost.mol.ResidueHandle.is_protein` property of residues when
See also :func:`AssignBackboneTorsions`.
peptide bonds are created. Turn this off if you would like to create your
own peptide bonds.
:type: :class:`bool`
:type: :class:`bool`
.. attribute:: zero_occ_treatment
Controls the behaviour of importing atoms with zero occupancy. By default,
this is set to warn.
:type: :class:`ConopAction`
.. method:: Process(ent)
.. method:: Process(ent)
Processess the entity *ent* according to the current options.
Processess the entity *ent* according to the current options.
The RuleBasedProcessor class
.. class:: HeuristicProcessor(check_bond_feasibility=False, \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
assign_torsions=True, connect=True, \
peptide_bonds=True, zero_occ_treatment=CONOP_WARN)
The :class:`HeuristicProcessor` implements the :class:`Processor` interface.
Refer to its documentation for methods and accessors common to all processor.
:param check_bond_feasibility: Sets :attr:`~Processor.check_bond_feasibility`
:param assign_torsions: Sets :attr:`~Processor.assign_torsions`
:param connect: Sets :attr:`~Processor.connect`
:param peptide_bonds: Sets :attr:`~Processor.peptide_bonds`
:param zero_occ_treatment: Sets :attr:`~Processor.zero_occ_treatment`
.. class:: RuleBasedProcessor(compound_lib, fix_elements=True, \
strict_hydrogens=False, \
unknown_res_treatment=CONOP_WARN, \
unknown_atom_treatment=CONOP_WARN, \
check_bond_feasibility=False, \
assign_torsions=True, connect=True, \
peptide_bonds=True, zero_occ_treatment=CONOP_WARN)
The :class:`RuleBasedProcessor` implements the :class:`Processor` interface.
Refer to its documentation for methods and accessors common to all processor.
:param compound_lib: The compound library to use
:type compound_lib: :class:`CompoundLib`
:param fix_elements: Sets :attr:`fix_elements`
:param strict_hydrogens: Sets :attr:`strict_hydrogens`
:param unknown_res_treatment: Sets :attr:`unk_atom_treatment`
:param unknown_atom_treatment: Sets :attr:`unk_res_treatment`
:param check_bond_feasibility: Sets :attr:`~Processor.check_bond_feasibility`
:param assign_torsions: Sets :attr:`~Processor.assign_torsions`
:param connect: Sets :attr:`~Processor.connect`
:param peptide_bonds: Sets :attr:`~Processor.peptide_bonds`
:param zero_occ_treatment: Sets :attr:`~Processor.zero_occ_treatment`
..
class:: RuleBasedProcessor(compound_lib)
..
attribute:: fix_elements
:param compound_lib: The compound library
Whether the element of the atom should be changed to the atom defined in the
:type compound_lib: :class:`CompoundLib`
compound library. Enabled by default.
The :class:`RuleBasedProcessor` implements the :class:`Processor` interface.
:type: :class:`bool`
Refer to its documentation for methods and accessors common to all processor.
.. attribute:: strict_hydrogens
.. attribute:: strict_hydrogens
Whether to use strict hydrogen naming rules outlined in the compound library.
Whether to use strict hydrogen naming rules outlined in the compound library.
...
@@ -119,22 +155,21 @@ The RuleBasedProcessor class
...
@@ -119,22 +155,21 @@ The RuleBasedProcessor class
.. attribute:: unk_atom_treatment
.. attribute:: unk_atom_treatment
Treatment upon encountering an unknown atom. Default: 'warn'.
Treatment upon encountering an unknown atom. Warn by default.
:type: :class:`
str
`
:type: :class:`
ConopAction
`
.. attribute:: unk_res_treatment
.. attribute:: unk_res_treatment
Treatment upon encountering an unknown residue
Treatment upon encountering an unknown residue. Warn by default.
:type: :class:`str`
.. attribute:: fix_elements
:type: :class:`ConopAction`
Whether the element of the atom should be changed to the atom defined in the
compound library. Enabled by default.
:type: :class:`bool`
.. class:: ConopAction
Defines actions to take when certain events happen during processing. Possible
values:
``CONOP_WARN``, ``CONOP_SILENT``, ``CONOP_REMOVE``, ``CONOP_REMOVE_ATOM``,
``CONOP_REMOVE_RESIDUE``, ``CONOP_FATAL``
This diff is collapsed.
Click to expand it.
modules/conop/pymod/export_processor.cc
+
7
−
3
View file @
011f7a63
...
@@ -80,10 +80,14 @@ void export_processor() {
...
@@ -80,10 +80,14 @@ void export_processor() {
.
add_property
(
"check_bond_feasibility"
,
.
add_property
(
"check_bond_feasibility"
,
&
Processor
::
GetCheckBondFeasibility
,
&
Processor
::
GetCheckBondFeasibility
,
&
Processor
::
SetCheckBondFeasibility
)
&
Processor
::
SetCheckBondFeasibility
)
.
add_property
(
"connect"
,
&
Processor
::
GetConnect
,
&
Processor
::
SetConnect
)
.
add_property
(
"assign_torsions"
,
&
Processor
::
GetAssignTorsions
,
.
add_property
(
"assign_torsions"
,
&
Processor
::
GetAssignTorsions
,
&
Processor
::
SetAssignTorsions
)
&
Processor
::
SetAssignTorsions
)
.
add_property
(
"connect"
,
&
Processor
::
GetConnect
,
&
Processor
::
SetConnect
)
.
add_property
(
"peptide_bonds"
,
&
Processor
::
GetConnectAminoAcids
,
&
Processor
::
SetConnectAminoAcids
)
.
add_property
(
"zero_occ_treatment"
,
&
Processor
::
GetZeroOccTreatment
,
&
Processor
::
SetZeroOccTreatment
)
.
def
(
"Process"
,
&
Processor
::
Process
,
.
def
(
"Process"
,
&
Processor
::
Process
,
(
arg
(
"ent"
),
arg
(
"log_diags"
)
=
true
))
(
arg
(
"ent"
),
arg
(
"log_diags"
)
=
true
))
;
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment