vibesketch.document.sequences¶
Peptides and nucleic acids from a sequence or HELM, as ordinary structures (#98).
A one-letter sequence or a HELM string becomes the full skeletal structure,
which is then an ordinary species: it is laid out, exported and calculated
like any other. RDKit builds both, with MolFromSequence and
MolFromHELM; this module checks the letters first, so a refusal names
the residue and its position instead of RDKit’s silent failure.
HELM is Pistoia Alliance’s Hierarchical Editing Language for Macromolecules: Zhang et al., J. Chem. Inf. Model. 2012, 52, 2796 (doi:10.1021/ci3001925).
Module Attributes
The import formats of this module. |
|
the 20 standard amino acids, L, and the four bases of DNA or RNA. |
|
The longest sequence read; longer ones exceed the layout limit anyway. |
Functions
|
One molecule per HELM string in |
|
The HELM of a molecule RDKit built from a sequence or HELM. |
|
The kind and one-letter sequence of |
|
|
|
Every species as HELM, one per line, or as FASTA records headed by its label or id. |
|
One molecule per sequence in |
|
|
Classes
|
A sequence as a figure prints it, with what it draws above the text. |
Exceptions
The text is not a sequence of the stated kind. |
- vibesketch.document.sequences.ALPHABETS: dict[str, str] = {'dna': 'ACGT', 'peptide': 'ACDEFGHIKLMNPQRSTVWY', 'rna': 'ACGU'}¶
the 20 standard amino acids, L, and the four bases of DNA or RNA.
- Type:
The one-letter codes each kind takes
- vibesketch.document.sequences.MAX_RESIDUES = 2500¶
The longest sequence read; longer ones exceed the layout limit anyway.
- vibesketch.document.sequences.SEQUENCE_FORMATS: tuple[str, ...] = ('peptide', 'dna', 'rna', 'helm')¶
The import formats of this module.
- class vibesketch.document.sequences.Printed(text, spans=(), bridges=(), chains=(), links=())[source]¶
Bases:
objectA sequence as a figure prints it, with what it draws above the text.
A peptide of several chains is its first chain here, the others in
chains, each printed on a line of its own below the one before.- Parameters:
- spans: tuple[tuple[int, int], ...] = ()¶
Per residue of a peptide, the start and end of its symbol in
text.
- exception vibesketch.document.sequences.SequenceRefused[source]¶
Bases:
ValueErrorThe text is not a sequence of the stated kind.
- vibesketch.document.sequences.helm_of(mol)[source]¶
The HELM of a molecule RDKit built from a sequence or HELM.
RDKit’s own HELM where it writes one; RDKit reads some monomers it does not write (Sar, Abu, D-Thr, D-Ile in 2026.09), and those keep the HELM they were read from.
- vibesketch.document.sequences.helm_molecules(text)[source]¶
One molecule per HELM string in
text, one per line.
- vibesketch.document.sequences.plain_sequence(helm)[source]¶
The kind and one-letter sequence of
helm, orNoneif it says more.A HELM is plain when it is one chain of standard residues without links: exactly what that one-letter sequence builds again. D-amino acids, other monomers, links such as disulfides and several chains are not.
- vibesketch.document.sequences.printed(helm)[source]¶
helmas a figure prints it: H-Tyr-D-Ala-Gly-OH, 5’-ACGU-3’ or 5’-d(ACGT)-3’.Peptides take IUPAC’s three-letter symbols with their termini, D-amino acids prefixed D- and the less common ones by their own symbols, and a disulfide as a bridge above the two cysteines, as “Nomenclature and symbolism for amino acids and peptides” (IUPAC-IUB JCBN 1983) draws cystine. A peptide of several chains, such as insulin, prints each on a line of its own, with a line joining the cysteines of each disulfide between two chains. Nucleic acids take their one-letter bases, 5’ to 3’, DNA marked d( ) as in IUPAC-IUB CBN’s “Abbreviations and symbols for nucleic acids, polynucleotides and their constituents” (1970).
- vibesketch.document.sequences.sequence_export(document, fmt)[source]¶
Every species as HELM, one per line, or as FASTA records headed by its label or id.