Skip to main content

DOoC

Usage

Train

# Regression train
from moltx import tokenizers
from dooc import models, datasets, nets


tk = tokenizers.MoltxTokenizer.from_pretrain(models.AdaMRTokenizerConfig.Prediction)
ds = datasets.MutSmiXAttention(tokenizer=tk, device=torch.device('cpu'))
smiles = ["c1cccc1c", "CC[N+](C)(C)Cc1ccccc1Br"]
mutations = [[1, 0, 0, ...], [1, 0, 1, ...]]
# e.g.
# import random
# [random.choice([0, 1]) for _ in range(3008)]
values = [0.85, 0.78]
smiles_src, smiles_tgt, mutations_src, out = ds(smiles, mutations, values)

model = models.MutSmiXAttention()
model.load_pretrained_ckpt('/path/to/drugcell.ckpt', '/path/to/moltx.ckpt')

crt = nn.MSELoss()

optim.zero_grad()
pred = model(smiles_src, smiles_tgt, mutations_src)
loss = crt(pred, out)
loss.backward()
optim.step()

torch.save(model.state_dict(), '/path/to/mutsmixattention.ckpt')

Inference

from dooc import pipelines, models
# dooc
model = models.MutSmiXAttention()
model.load_ckpt('/path/to/mutsmixattention.ckpt')
pipeline = pipelines.MutSmiXAttention()
pipeline([1, 0, 0, ...], "C=CC=CC=C")
# 0.85

Metadata

Release files for dooc 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dooc 0.0.2
File Size Uploaded Provenance
dooc-0.0.2.tar.gz 282.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dooc 0.0.2
File Interpreter ABI Platform
dooc-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 569.7 kB

Release files / dooc-0.0.2.tar.gz

Download URL dooc-0.0.2.tar.gz
Size 282.3 kB
Tags Source
SHA-256 checksum
How to use checksums
40ba254f21396935e3e384eed7f3e6a3e4d4e10c78c8c795340cc6c19d2c0285
BLAKE2b-256 checksum
How to use checksums
3922ab489a2776ad7d4a0a31fec64631296a2d9ba3df2adc80a83b237cfcc1f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / dooc-0.0.2-py3-none-any.whl

Download URL dooc-0.0.2-py3-none-any.whl
Size 287.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d20ea9ecfcc5af20e684de8ea711c017dc1c006b8a79298b7ddbbd9c45ded65
BLAKE2b-256 checksum
How to use checksums
41a4888e0b9cb580f34b4a7b05b3cc93856a2c5d4265a221456918d53aa482ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Security for dooc 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page