schrodinger.protein.process_nucleotide_db module¶
This script processes a nucleotide residue database to prepare modified nucleosides for use in mmshare mutation workflows. This includes:
assigning unique 3-letter residue names to each residue
checking for valence violations
adding 5’-monophosphate groups to nucleosides that lack them
standardizing structure geometry and optionally minimizing
assigning “similar to” values by fingerprint comparison to standard RNA nucleosides
Output includes a processed residue database file, CSV logs of successes and failures, and a timestamped log file.
- schrodinger.protein.process_nucleotide_db.main(options: Namespace) None¶
Run the nucleotide database processing pipeline.
- Parameters:
options – parsed CLI arguments from
parse_args
- schrodinger.protein.process_nucleotide_db.parse_args(args=None) Namespace¶
Parse command-line arguments for the nucleotide database processor.
- Returns:
parsed arguments namespace
- schrodinger.protein.process_nucleotide_db.process_nucleotide_db(residues: Iterable[Structure], skip_minimization: bool = False) PreprocessingOutcomes¶
Process a nucleotide structure database.
Each residue is assigned a unique auto-generated 3-letter PDB code (
ZAA-style).- Parameters:
residues – iterable of input nucleoside/nucleotide structures
skip_minimization – if True, skip force-field minimization
- Returns:
PreprocessingOutcomeswith per-residue results
- schrodinger.protein.process_nucleotide_db.get_unique_nucleotide_names(reserved: set[str] | None = None) Iterable[str]¶
Generate unique 3-letter codes for custom nucleotides, skipping any names in reserved (built-in nucleotide codes and CSV-assigned codes).
Delegates to
get_unique_aa_namesso the generated codes follow the sameZAA-style pattern used for custom amino acids.- Parameters:
reserved – set of codes to avoid; defaults to built-in nucleotide names
- Returns:
iterator of unique 3-letter code strings
- class schrodinger.protein.process_nucleotide_db.CheckValenceViolations(**kwargs)¶
Bases:
PreprocessorStageFail any structure that cannot be sanitized by RDKit due to valence errors.
- NAME = 'Check valence violations'¶
- class schrodinger.protein.process_nucleotide_db.AddPhosphate(**kwargs)¶
Bases:
PreprocessorStageAdd a 5’-monophosphate group to a nucleoside that lacks one.
Uses an RDKit SMARTS reaction targeting the primary 5’-OH ([OH1][CH2]). Secondary hydroxyls (2’-OH, 3’-OH) are not affected because they are on CH groups, not CH2 groups.
Structures that already contain a phosphorus atom are passed through unchanged. 3D coordinate generation is handled by the subsequent
Generate3DStructurestage.- NAME = "Add 5'-phosphate"¶
- class schrodinger.protein.process_nucleotide_db.Generate3DStructure(**kwargs)¶
Bases:
PreprocessorStageGenerate 3D coordinates for structures that lack them.
Structures read from SMILES files or produced by the
AddPhosphateRDKit reaction have no 3D coordinates. This stage generates a conformation using the Schrodinger fast-3D pipeline. Structures that already have 3D coordinates (e.g. from a.maeor.sdfinput) are passed through unchanged.- NAME = 'Generate 3D structure'¶
- class schrodinger.protein.process_nucleotide_db.StandardizeNucleotideStructure(skip_minimization: bool = False)¶
Bases:
PreprocessorStageAssign PDB backbone atom names, add hydrogens, check for standard nucleotide name collision, and optionally minimize.
Delegates to
NucleotideDatabase.fix_and_validate_res_structure, which internally: checks atom count, assigns backbone PDB names via theOCCC[O]P(=O)(O)(O)SMARTS, rejects built-in standard nucleotide names, adds hydrogens, and runs force-field minimization unless skipped.- NAME = 'Standardize nucleotide structure'¶
- __init__(skip_minimization: bool = False)¶
- class schrodinger.protein.process_nucleotide_db.ValidateMutability¶
Bases:
PreprocessorStageVerify that the processed nucleotide can be applied as a mutation to a real RNA residue.
Loads an Adenine residue from the built-in
rna.bldlibrary as the mutation target and callsinfrastructure.mutate_nucleotide. This exercises the same code path used by the mutation workflow and catches structures whose backbone atom-naming is incompatible.Must run after
StandardizeNucleotideStructure, which assigns the correct PDB backbone atom names required by the C++ mutator.- NAME = 'Validate mutability'¶
- __init__()¶
- schrodinger.protein.process_nucleotide_db.apply_nucleotide_analog_properties(processed_residues: list[Structure]) None¶
Assign
ALIGNS_WITH_PROPandNATURAL_ANALOG_SIMILARITY_PROPto each processed nucleotide.- Parameters:
processed_residues – list of processed nucleotide structures
- schrodinger.protein.process_nucleotide_db.get_nucleotide_analog_map(residue_sts: list[Structure]) dict[str, tuple[str, float]]¶
Get a map of custom nucleotide names to their closest standard nucleoside, using Canvas fingerprint similarity.
Standard nucleosides are loaded from both
rna.bld(A, C, G, U) anddna.bld(T only; A/C/G are shared with RNA and not duplicated). Structures are relabeled with their 1-letter codes so the map values are ready to use asALIGNS_WITH_PROPvalues.- Parameters:
residue_sts – processed nucleotide structures; each must have a unique
title- Returns:
dict mapping structure title to (1-letter code, similarity score)