Skip to content
uibcdfPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ViableMT

MolSysSuite: Scientific Component MolSysSuite policy Python 3.11 | 3.12 | 3.13 License

ViableMT is the developability and liability profiling component of MolSysSuite. It is being built to help teams decide which computational molecular hits to acquire or synthesize, how to test them, and which measurements could change the decision to advance them.

Current status

This checkout provides validated scientific records, versioned JSON storage and local small-molecule profiles through a qualified MolSysMT source and installed RDKit. Explicit assay-context rules suggest follow-up measurements, and declared objectives support Pareto comparisons. Profiles preserve chemical state, provenance, units, censoring, missing evidence and original provider reports. The implementation plan records completed local M0–M3 work, the M4 demonstration/pilot software and the M5 kinetic-solubility development benchmark. Prospective validation and predictive-model qualification remain pending. There is no public package release or qualified Rust core.

An opt-in M6 ADMET-AI adapter now defines eight exploratory prediction tasks: aqueous solubility, intestinal absorption, blood-brain barrier penetration, inhibition of three CYP enzymes, hERG and Ames. Its source contract is tested, and actual CPU receiving matches direct provider output for three public structures. The explicit CUDA route runs on the received RTX 2080 Ti stack, with CPU as the default. get_admet_profiles processes a series of hits with one model load and keeps their original order and evidence. Each saved profile preserves all model outputs and can be read without the prediction engines. Project qualification remains pending. Batch API and verification.

Use with hits for a molecular target

For a series of small-molecule hits, ViableMT helps assemble evidence for deciding which compounds to test and which follow-up measurements are needed. Start with candidate IDs, structures and chemical states, the original ranking or activity results, and the intended assay conditions. Add acquisition information, a testing budget and explicit comparison objectives when planning a pilot.

Project input Current output
Structures and original ranking Traceable profiles with supported descriptors, structural alerts and the original ranking retained
Supplied measurements and assay conditions Context-dependent follow-ups, such as checking solubility across the planned concentration range
Explicit objectives and comparable evidence Trade-offs, a Pareto front and missing or incomparable evidence
Candidate series, assay, equal budgets and success criteria A frozen pilot plan for comparing selection strategies and recording outcomes

Binding, activity and selectivity require evidence for the particular target. Structural alerts and the experimental OpenADMET solubility models do not establish those properties. M5 predictions are not integrated into hit selection; the pilot contract distinguishes implemented planning from prospective experimental validation.

Quick start: a complete local demonstration

In the qualified local-engine environment, run:

python -m viablemt.demo --output viablemt-demo

This offline example calculates profiles for three real OpenADMET structures, receives their public measurements, and demonstrates follow-ups and comparison using separate synthetic assay observations and rankings. It saves and reloads profiles, comparison and a frozen pilot plan with equal selection budgets. All pilot outcomes remain untested. An unfilled real-pilot template is included. The output directory must be new.

Use --evidence-only for the explicit variant without molecular calculations. With the ADMET-AI runtime, add exploratory predictions to the same synthetic pilot:

python -m viablemt.demo --output viablemt-demo-admet --admet-device cpu

The profiles and pilot retain the predictions alongside the local descriptors and supplied observations. The demo selections use the synthetic activity and kinetic-solubility evidence. Select --admet-device cuda in the configured CUDA environment.

The M4 contract describes outputs and pilot records; the OpenADMET review records licensing, source hashes, units, censoring and test coverage.

Evaluate solubility baselines

The M5 benchmark receives the pinned OpenADMET–ExpansionRx training data, preserves censoring and missing observations, and compares a median reference, nearest analogue and Morgan/Ridge regression. It separates scaffold groups for fitting, interval calibration and evaluation.

With the optional benchmark providers and the qualified MolSysMT source route, run the two offline steps using the pinned raw and training CSVs:

python -m viablemt.benchmark prepare --source-dir SOURCE_DIRECTORY --output prepared-solubility
python -m viablemt.benchmark run --prepared prepared-solubility --output evaluated-solubility

Both output directories must be new. The protocol, source units, data hashes, predictions, applicability and evaluation results are retained as JSON. This is a retrospective development evaluation: the diagnostic 10 µM threshold does not define acceptance for a real project, and no model influences candidate selection.

To explore fixed model alternatives using scaffold cross-validation inside the original fit partition:

python -m viablemt.benchmark explore --prepared prepared-solubility --output explored-solubility

The exploration protocol compares three Ridge settings, ExtraTrees and SVR, then records a separate comparison of the CV choice against the original Ridge reference. Calibration and evaluation do not choose the model. The previously observed evaluation remains a development check.

Audit the saved predictions without molecular or learning engines:

python -m viablemt.benchmark audit --explored explored-solubility --output audited-solubility

The error audit checks artifact links and observation identities, then reports errors by solubility, similarity and scaffold, along with paired threshold-decision changes. These diagnostics guide development and retain the original predictions and scientific qualification limits.

The low-solubility refinement protocol freezes a follow-up experiment before fitting. Planning uses the core reader only:

python -m viablemt.benchmark plan-refinement --prepared prepared-solubility --output planned-solubility

With scikit-learn, SciPy and threadpoolctl, the separate execution step compares Ridge, SVR and two fixed SVR weighting variants inside the original fit partition:

python -m viablemt.benchmark refine --planned planned-solubility --output refined-solubility

Both destinations must be new. This step reports a research choice from training cross-validation; it does not evaluate the reserved partitions or qualify a model for a project. The completed development experiment selected the original Ridge control for low-solubility error; neither weighted SVR beat it. Unweighted SVR retained the smallest overall error. The installed package reproduced all four output files exactly. Independent qualification and project acceptance remain pending.

Receive that choice against the saved exploration without another fit:

python -m viablemt.benchmark assess-refinement --refined refined-solubility --explored explored-solubility --output assessed-solubility

The refinement assessment checks both input chains and control equivalence, then reuses matching development predictions. It requires no optional engines. A choice without retained predictions is reported as unavailable. The original Ridge choice has no improvement over itself; the report keeps the SVR trade-off and missing project acceptance visible.

Store a supplied observation

This synthetic example constructs and saves a profile; it does not calculate solubility or validate the submitted chemistry.

import pyunitwizard as puw
import viablemt as vmt

candidate = vmt.Candidate(
    id="example-hit",
    structures=[vmt.StructureReference(id="input", form="smiles", reference="CCO")],
    original_structure_id="input",
    evaluated_structure_id="input",
)
endpoint = vmt.Endpoint(
    id="solubility",
    definition="Kinetic solubility in the stated assay medium",
    kind="quantity",
    unit="uM",
)
value = puw.QuantityRecord.from_quantity(
    puw.quantity(10.0, "uM", form="pint", parser="pint"),
    field="solubility",
)
finding = vmt.Finding(
    id="solubility-bound",
    endpoint=endpoint,
    representation_id="input",
    evidence_kind="measurement",
    value=value,
    qualifier=">",
    source=vmt.Source(id="synthetic-example", source_text=">10 µM"),
)
profile = vmt.HitProfile(id="example-profile", candidate=candidate, findings=[finding])
vmt.save_profile(profile, "example-profile.json")
restored = vmt.load_profile("example-profile.json", expected_units={"solubility": "nM"})
assert restored.findings[0].qualifier == ">"
assert restored.findings[0].value.unit == "micromolar"

Reading checks unit compatibility while retaining the stored unit and bound. Use profile_to_dict and profile_from_dict for detached in-memory documents. See the M1 contract for value kinds, uncertainty, availability, validation, local-file semantics and reader dependencies.

Calculate a local profile

In the qualified M2 environment, extend the example above to calculate descriptors and structural alerts while retaining the supplied solubility bound:

calculated = vmt.get_viability_profile(candidate, findings=[finding])
by_endpoint = {item.endpoint.id: item for item in calculated.findings}
assert calculated.status == "complete"
assert by_endpoint["tpsa"].value is not None
assert by_endpoint["prediction:herg"].value is None
vmt.save_profile(calculated, "calculated-profile.json")

The input must be a single connected, closed-shell molecule with an explicit SMILES reference. The function does not prepare or neutralize it. Optional synthetic_accessibility=True selects installed RDKit SA Score resources; analogues=[...] accepts StructureReference records for Morgan similarity. Independent calculation failures produce a partial profile by default.

M2 requires the reviewed MolSysMT source APIs; published MolSysMT 0.23.0 is insufficient. The rdkit extra installs RDKit only. See the M2 contract for acquisition, method definitions, input limits, error behavior, provider reports and schema-1 compatibility.

Assess evidence and compare profiles

Declare endpoint roles and comparison objectives explicitly. For the example above, the solubility rule records an abstention because the supplied observation does not declare assay conditions. Its bound and source remain intact:

reviewed = vmt.recommend_followups(
    calculated,
    rules=[
        vmt.FollowUpRule(
            id="solubility-range",
            kind="solubility",
            endpoint=endpoint,
            rationale="Check coverage of the planned assay concentration range",
        )
    ],
)
assert not reviewed.follow_ups
tpsa = by_endpoint["tpsa"]
comparison = vmt.compare_profiles(
    [reviewed],
    objectives=[
        vmt.Objective(
            id="area",
            endpoint=tpsa.endpoint,
            direction="minimize",
            evidence_rule="single",
            evidence_kind="calculation",
            method=tpsa.method,
        )
    ],
)
assert comparison.front_profile_ids == (reviewed.id,)

The M3 contract includes an executable example with two candidates, synthetic measurements and declared assay conditions that uses no molecular engines. It explains rule applicability, manual follow-up preservation, omitted recommendations, explicit evidence selection, numerical resolution, ties and incomparable candidates. Project constraints are reported separately from the Pareto front; the original computational ranking is preserved.

Scientific scope

The first workflow focuses on small molecules from a shared project and assay context. It will retain chemical identity and provenance while assembling:

  • Physicochemical descriptors, solubility evidence and assay feasibility.
  • Structural alerts and potential aggregation, reactivity or readout interference.
  • Endpoint-specific toxicology evidence, including hERG and Ames where supported.
  • Synthetic accessibility, analogue evidence and acquisition considerations.
  • Candidate comparisons and up to three justified follow-up measurements.

The broader scope includes developability, ADMET, stability, formulatability, and the viability of peptides, macrocycles and biological probes. Specialized methods and performance work will follow their own implementation and scientific qualification. See the scientific plan for the prospective pilot and model evaluation requirements.

Development

ViableMT targets Python 3.11 through 3.14 (>=3.11,<3.15). Routine local work uses the existing MolI_dev@3.14 Conda environment. The Conda files in devtools/conda-envs/ are CI/bootstrap fixtures.

conda activate MolI_dev@3.14
python -m pip install --no-deps --no-build-isolation --editable .
python -m pip check
ruff check .
ruff format --check .
python -m pytest --receptor=llm
python devtools/devguide_index.py --check

For profiling changes, also run python -m pytest --receptor=llm --local-engines with the qualified providers. The ordinary core run skips that explicit gate; it does not establish installed-engine compatibility.

For M5 changes, also select --benchmark-engines. Its gate requires the actual installed molecular and learning providers and fails if they are missing or shadowed. The M5 record distinguishes core, optional-provider and installed-artifact evidence.

For M6 changes, select --admet-engines tests/test_admet_engines.py with the received ADMET providers. Add --admet-device=cuda for the explicit GPU gate; absence fails. The CUDA receiving record explains device visibility, isolated installation, numerical tolerances and timing scope.

Read AGENTS.md and MOLSYSSUITE_GUIDE.md before contributing. The foundation record identifies the starter, local validation and remaining qualification scope. Retained GitHub workflows describe future automated checks; the current operational route follows the MolI manual validation policy. The Python support target and badge do not establish an executed installed-package matrix.

MolSysSuite integration

ViableMT uses PyUnitWizard for quantities, ArgDigest for public arguments, SMonitor for structured diagnostics and DepDigest for optional providers. It uses MolSysMT for molecular representations and supported analysis, and RDKit for applicable chemistry. Sabueso integration for explicitly requested evidence retrieval remains planned. ViableMT owns the profile, assay-context interpretation and candidate comparison. BindingMT, PharmacophoreMT, TopoMT, AlloMT and PeptideMT retain their scientific domains; MolSysViewer and MolSysSketcher provide visualization.

Internal work belongs in the ViableMT Forgejo tracker. The issue inventory preserves historical GitHub references. Follow the reporting protocol and Discussions guidance for their respective routes.

License

ViableMT software is distributed under the MIT License. The foundation retains the official starter's copyright notice. The bundled OpenADMET–ExpansionRx sample retains CC BY 4.0 attribution and terms; the distribution's combined expression is MIT AND CC-BY-4.0.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages