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
58a9a88a
Commit
58a9a88a
authored
5 years ago
by
Gerardo Tauriello
Browse files
Options
Downloads
Patches
Plain Diff
Clarify doc for CopyResidue functions.
parent
02c266d7
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/mol/alg/doc/molalg.rst
+21
-14
21 additions, 14 deletions
modules/mol/alg/doc/molalg.rst
modules/mol/alg/src/nonstandard.cc
+4
-4
4 additions, 4 deletions
modules/mol/alg/src/nonstandard.cc
with
25 additions
and
18 deletions
modules/mol/alg/doc/molalg.rst
+
21
−
14
View file @
58a9a88a
...
...
@@ -1656,17 +1656,22 @@ to standard amino acids.
Copies the atoms of ``src_res`` to ``dst_res`` using the residue names
as guide to decide which of the atoms should be copied. If ``src_res`` and
``dst_res`` have the same name, or ``src_res`` is a modified version of
``dst_res`` (i.e. have the same single letter code), CopyConserved will be
called, otherwise CopyNonConserved will be called.
``dst_res`` (i.e. have the same single letter code), :func:`CopyConserved`
will be called, otherwise :func:`CopyNonConserved`.
If a CBeta atom wasn't already copied from ``src_res``, a new one at a
reconstructed position will be added to ``dst_res`` if it is not ``GLY`` and
all backbone positions are available to do it.
:param src_res: The source residue
:type src_res: :class:`~ost.mol.ResidueHandle`
:param dst_res: The destination residue
:param dst_res: The destination residue
(expected to be a standard amino acid)
:type dst_res: :class:`~ost.mol.ResidueHandle`
:param editor: Editor used to modify *dst_res*.
:type editor: :class:`~ost.mol.XCSEditor`
:returns: True if the residue could be copied, False if not.
:returns: True if the residue could be copied as a conserved residue,
False if it had to fallback to :func:`CopyNonConserved`.
.. function:: CopyConserved(src_res, dst_res, editor)
...
...
@@ -1677,35 +1682,37 @@ to standard amino acids.
to ``dst_res``. If ``src_res`` is a modified version of ``dst_res`` and the
modification is a pure addition (e.g. the phosphate group of phosphoserine),
the modification is stripped off and all other heavy atoms are copied to
``dst_res``. If the modification is not a pure addition,
only the
back
bone
heavy atoms are copied to ``dst_res`
`.
``dst_res``. If the modification is not a pure addition,
it falls
back
to
:func:`CopyNonConserved
`.
Additionally, the selenium atom of ``MSE`` is converted to sulphur.
Additionally, the selenium atom of ``MSE`` is converted to sulphur to map
``MSE`` to ``MET``.
:param src_res: The source residue
:type src_res: :class:`~ost.mol.ResidueHandle`
:param dst_res: The destination residue
:param dst_res: The destination residue
(expected to be a standard amino acid)
:type dst_res: :class:`~ost.mol.ResidueHandle`
:param editor: Editor used to modify *dst_res*.
:type editor: :class:`~ost.mol.XCSEditor`
:returns: A tuple of bools stating whether the residue could be copied and
whether the Cbeta atom was inserted into the ``dst_res``.
:returns: A tuple of bools stating whether the residue could be copied without
falling back to :func:`CopyNonConserved` and whether the CBeta atom
was copied from ``src_res`` to ``dst_res``.
.. function:: CopyNonConserved(src_res, dst_res, editor)
Copies the heavy backbone atoms and C
b
eta (except for ``GLY``) of ``src_res``
Copies the heavy backbone atoms and C
B
eta (except for ``GLY``) of ``src_res``
to ``dst_res``.
:param src_res: The source residue
:type src_res: :class:`~ost.mol.ResidueHandle`
:param dst_res: The destination residue
:param dst_res: The destination residue
(expected to be a standard amino acid)
:type dst_res: :class:`~ost.mol.ResidueHandle`
:param editor: Editor used to modify *dst_res*.
:type editor: :class:`~ost.mol.XCSEditor`
:returns: A tuple of bools
stating whether the residue could be copied and
whether the Cbeta atom
was
inserted into the ``dst_res``
.
:returns: A tuple of bools
as in :func:`CopyConserved` with the first bool
al
wa
y
s
being False
.
Molecular Checker (Molck)
...
...
This diff is collapsed.
Click to expand it.
modules/mol/alg/src/nonstandard.cc
+
4
−
4
View file @
58a9a88a
...
...
@@ -49,16 +49,16 @@ bool CopyResidue(ResidueHandle src_res, ResidueHandle dst_res,
bool
has_cbeta
=
false
;
bool
ret
;
char
parent_src
=
(
comp_lib
->
FindCompound
(
src_res
.
GetName
(),
Compound
::
PDB
))
->
GetOneLetterCode
();
Compound
::
PDB
))
->
GetOneLetterCode
();
char
parent_dst
=
(
comp_lib
->
FindCompound
(
dst_res
.
GetName
(),
Compound
::
PDB
))
->
GetOneLetterCode
();
if
(
parent_src
==
parent_dst
)
{
Compound
::
PDB
))
->
GetOneLetterCode
();
if
(
parent_src
==
parent_dst
)
{
ret
=
CopyConserved
(
src_res
,
dst_res
,
edi
,
has_cbeta
,
comp_lib
);
}
else
{
ret
=
CopyNonConserved
(
src_res
,
dst_res
,
edi
,
has_cbeta
);
}
// insert Cbeta, unless dst residue is glycine.
if
(
!
has_cbeta
&&
dst_res
.
GetName
()
!=
"GLY"
)
{
if
(
!
has_cbeta
&&
dst_res
.
GetName
()
!=
"GLY"
)
{
try
{
geom
::
Vec3
cbeta_pos
=
mol
::
alg
::
CBetaPosition
(
dst_res
);
edi
.
InsertAtom
(
dst_res
,
"CB"
,
cbeta_pos
,
"C"
);
...
...
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