vermouth.processors.do_links module¶
- class vermouth.processors.do_links.DoLinks[source]¶
Bases:
Processor
Apply Links, taken from a molecule’s force field, to the molecule.
- vermouth.processors.do_links.match_order(order1, resid1, order2, resid2)[source]¶
Check if two residues match the order constraints.
The order can be:
- an integer
It is then the expected distance in resid with a reference residue.
- a series of >
This indicates that the residue must have a larger resid than a reference residue. Multiple atoms with the same number of > are expected to be part of the same residue. The more > are in the serie, the further away the residue is expected to be from the reference, so a residue with >> is expected to have a greater resid than a residue with >.
- a series of <
Same as a series of >, but for smaller resid.
- a series of *
This indicates a different residue than the reference, but without a specified order. As for the > or the <, atoms with the same number of * are expected to be part of the same residue.
The comparison matrix can be sumerized as follow, with 0 being the reference residue, n being an integer. In the matrix, a ? means that the result depends on the comparison of the actual numbers, a ! means that the comparison should not be considered, and / means that the resids must be different. The rows correspond to the order at the left of the comparison (order1 argument), while the columns correspond to the order at the right of it (order2 argument).
>
>>
<
<<
n
0
*
**
>
=
<
>
>
!
>
!
!
>>
>
=
>
>
!
>
!
!
<
<
<
=
>
!
<
!
!
<<
<
<
<
=
!
<
!
!
n
!
!
!
!
?
?
!
!
0
<
<
>
>
?
=
/
/
*
!
!
!
!
!
/
=
/
**
!
!
!
!
!
/
/
=
- Parameters:
order1 (int or str) – The order attribute of the residue on the left of the comparison.
resid1 (int) – The residue id of the residue on the left of the comparison.
order2 (int or str) – The order attribute of the residue on the right of the comparison.
resid2 (int) – The residue id of the residue on the right of the comparison.
- Returns:
True if the conditions match.
- Return type:
- Raises:
ValueError – Raised if the order arguments do not follow the expected format.