Skip to main content

Chytorch [kʌɪtɔːrtʃ]

Library for modeling molecules and reactions in torch way.

Installation

Use pip install chytorch to install release version.

Or pip install . in source code directory to install DEV version.

Pretrained models

Chytorch main package doesn't include models zoo. Each model has its own named package and can be installed separately. Installed models can be imported as from chytorch.zoo.<model_name> import Model.

Usage

chytorch.nn.MoleculeEncoder - core graphormer layer for molecules encoding. API is combination of torch.nn.TransformerEncoderLayer with torch.nn.TransformerEncoder.

Batch preparation:

chytorch.utils.data.MoleculeDataset - Map-like on-the-fly dataset generators for molecules. Supported chython.MoleculeContainer objects, and PaCh structures.

chytorch.utils.data.collate_molecules - collate function for torch.utils.data.DataLoader.

Note: torch DataLoader automatically do proper collation since 1.13 release.

Example:

from chytorch.utils.data import MoleculeDataset, SMILESDataset
from torch.utils.data import DataLoader

data = ['CCO', 'CC=O']
ds = MoleculeDataset(SMILESDataset(data, cache={}))
dl = DataLoader(ds, batch_size=10)

Forward call:

Molecules coded as tensors of:

  • atoms numbers shifted by 2 (e.g. hydrogen = 3). 0 - reserved for padding, 1 - reserved for CLS token, 2 - extra reservation.

  • neighbors count, including implicit hydrogens shifted by 2 (e.g. CO = CH3OH = [6, 4]). 0 - reserved for padding, 1 - extra reservation, 2 - no-neighbors, 3 - one neighbor.

  • topological distances' matrix shifted by 2 with upper limit. 0 - reserved for padding, 1 - reserved for not-connected graph components coding, 2 - self-loop, 3 - connected atoms.

    from chytorch.nn import MoleculeEncoder

    encoder = MoleculeEncoder() for b in dl: encoder(b)

Combine molecules and labels:

chytorch.utils.data.chained_collate - helper for combining different data parts. Useful for tricky input.

from torch import stack
from torch.utils.data import DataLoader, TensorDataset
from chytorch.utils.data import chained_collate, collate_molecules, MoleculeDataset

dl = DataLoader(TensorDataset(MoleculeDataset(molecules_list), properties_tensor),
    collate_fn=chained_collate(collate_molecules, stack))

Voting NN with single hidden layer:

chytorch.nn.VotingClassifier, chytorch.nn.BinaryVotingClassifier and chytorch.nn.VotingRegressor - speed optimized multiple heads for ensemble predictions.

Helper Modules:

chytorch.nn.Slicer - do tensor slicing. Useful for transformer's CLS token extraction in torch.nn.Sequence.

Data Wrappers:

In chytorch.utils.data module stored different data wrappers for simplifying ML workflows. All wrappers have torch.utils.data.Dataset interface.

  • SizedList - list wrapper with size() method. Useful with torch.utils.data.TensorDataset.
  • SMILESDataset - on-the-fly smiles to chython.MoleculeContainer or chython.ReactionContainer parser.
  • LMDBMapper - LMDB KV storage to dataset mapper.
  • TensorUnpack, StructUnpack, PickleUnpack - bytes to tensor/object unpackers

Publications

1 Bidirectional Graphormer for Reactivity Understanding: Neural Network Trained to Reaction Atom-to-Atom Mapping Task

Metadata

Release files for chytorch-synplan 1.70

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

Built distributions (wheels)

Table of built distributions (wheels) for chytorch-synplan 1.70
File
chytorch_synplan-1.70-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
chytorch_synplan-1.70-cp314-cp314-win32.whl CPython 3.14 CPython 3.14 Windows x86-32 Details
chytorch_synplan-1.70-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
chytorch_synplan-1.70-cp314-cp314-macosx_14_0_arm64.whl CPython 3.14 CPython 3.14 macOS 14.0+ ARM64 Details
chytorch_synplan-1.70-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
chytorch_synplan-1.70-cp313-cp313-win32.whl CPython 3.13 CPython 3.13 Windows x86-32 Details
chytorch_synplan-1.70-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
chytorch_synplan-1.70-cp313-cp313-macosx_14_0_arm64.whl CPython 3.13 CPython 3.13 macOS 14.0+ ARM64 Details
chytorch_synplan-1.70-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
chytorch_synplan-1.70-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details
chytorch_synplan-1.70-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
chytorch_synplan-1.70-cp312-cp312-macosx_14_0_arm64.whl CPython 3.12 CPython 3.12 macOS 14.0+ ARM64 Details
chytorch_synplan-1.70-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
chytorch_synplan-1.70-cp311-cp311-win32.whl CPython 3.11 CPython 3.11 Windows x86-32 Details
chytorch_synplan-1.70-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
chytorch_synplan-1.70-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details
chytorch_synplan-1.70-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
chytorch_synplan-1.70-cp310-cp310-win32.whl CPython 3.10 CPython 3.10 Windows x86-32 Details
chytorch_synplan-1.70-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
chytorch_synplan-1.70-cp310-cp310-macosx_14_0_arm64.whl CPython 3.10 CPython 3.10 macOS 14.0+ ARM64 Details

Total release size: 5.9 MB

Release files / chytorch_synplan-1.70-cp314-cp314-win_amd64.whl

Download URL chytorch_synplan-1.70-cp314-cp314-win_amd64.whl
Size 135.6 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
5fd4de0a1f64bc0c7f8cac26494461808b0dab17d2c7fb446ec4f9775b38435c
BLAKE2b-256 checksum
How to use checksums
72f8c462156fa3d783ded70c20875838cd239c4e0d32f13ff22fa5b198b8006c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / chytorch_synplan-1.70-cp314-cp314-win32.whl

Download URL chytorch_synplan-1.70-cp314-cp314-win32.whl
Size 123.1 kB
Tags CPython 3.14 Windows x86-32
SHA-256 checksum
How to use checksums
6bde75156c8372a646214ca658d0e1d13ae033069febf6db811ad7c54d9fe9e1
BLAKE2b-256 checksum
How to use checksums
a532dcb2987233b150304b77bde5002329aae119fc0ae1997354545b147e8f33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / chytorch_synplan-1.70-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL chytorch_synplan-1.70-cp314-cp314-manylinux_2_28_x86_64.whl
Size 721.2 kB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b9c5f4f36398689d0fcd0b1bc898bc648ee113c47c54d4a757a000f2793392d9
BLAKE2b-256 checksum
How to use checksums
76c7fc287e773ae6f3a370302374d81efc512946d340a93940d1590d693b86f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / chytorch_synplan-1.70-cp314-cp314-macosx_14_0_arm64.whl

Download URL chytorch_synplan-1.70-cp314-cp314-macosx_14_0_arm64.whl
Size 206.9 kB
Tags CPython 3.14 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
6ca827a788676988dbd2b6b96c89c74cd7272653aa15f221f0e30745a3d797af
BLAKE2b-256 checksum
How to use checksums
514f8ca4c5f12388cc46ed65f70acceb965da641a6a8c86876a7eab3c72e4c4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / chytorch_synplan-1.70-cp313-cp313-win_amd64.whl

Download URL chytorch_synplan-1.70-cp313-cp313-win_amd64.whl
Size 132.9 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
b2d21d4246ab7e678eb00ab2401fc69481cb48d1120ee6d28100da54d56d7e36
BLAKE2b-256 checksum
How to use checksums
06dd998fd021eb3ab38667c2bdf5d3334a4ccbfca468920223b26b8e095ea9b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / chytorch_synplan-1.70-cp313-cp313-win32.whl

Download URL chytorch_synplan-1.70-cp313-cp313-win32.whl
Size 121.1 kB
Tags CPython 3.13 Windows x86-32
SHA-256 checksum
How to use checksums
d2748ea8b827010a8df5071840bf0c118a7a2ac87c7d3efd1b4515f6c4f50a41
BLAKE2b-256 checksum
How to use checksums
f5074ac657631e2bc6552a86d399d0842e95e94985cbf3aeae58e276fb9f595f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / chytorch_synplan-1.70-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL chytorch_synplan-1.70-cp313-cp313-manylinux_2_28_x86_64.whl
Size 722.4 kB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
57c4ad4aeeff99ae268352a8089f6c830349bb3b00af2703eda7f7982ee5f4ea
BLAKE2b-256 checksum
How to use checksums
5dc98d7375702707ce3750656dd48cf2cb653d36aabedaa81acea47bd8815d4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / chytorch_synplan-1.70-cp313-cp313-macosx_14_0_arm64.whl

Download URL chytorch_synplan-1.70-cp313-cp313-macosx_14_0_arm64.whl
Size 206.5 kB
Tags CPython 3.13 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
84745ab632130536bb0e8e00a87159ddeafde566bf02cebf834bccddf1676230
BLAKE2b-256 checksum
How to use checksums
eee794ed47cbfadd7ca948b343309e46b23033422d5d5071eb325b78b467aeaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / chytorch_synplan-1.70-cp312-cp312-win_amd64.whl

Download URL chytorch_synplan-1.70-cp312-cp312-win_amd64.whl
Size 133.2 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
6a5e136d7684d66f9d71db2ddd8ba77cc2e8013e9198518c7591e97cf36024ff
BLAKE2b-256 checksum
How to use checksums
82e7c8f5140c19c5775a8689a8d6795908acfad6e277a3c469cb4b29cb2b4a0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / chytorch_synplan-1.70-cp312-cp312-win32.whl

Download URL chytorch_synplan-1.70-cp312-cp312-win32.whl
Size 121.2 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
6230ef7fd0c78fd73b1cfdf51e6907f77ebf2cda725ab642baec71cd9cc45fd3
BLAKE2b-256 checksum
How to use checksums
32d0aaefcafdbdadc0f7536ddfeeedc40da534267bb24a33ed28cfd4a146782b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / chytorch_synplan-1.70-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL chytorch_synplan-1.70-cp312-cp312-manylinux_2_28_x86_64.whl
Size 725.8 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4a8052892756cdb3674dff3d6cca2b63a1bc0df9c571638b823bbce594a126d6
BLAKE2b-256 checksum
How to use checksums
d08edbbf61744ed85af2d8ad715fd24b23c60509615dcea82ea57bcb5b03f4c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / chytorch_synplan-1.70-cp312-cp312-macosx_14_0_arm64.whl

Download URL chytorch_synplan-1.70-cp312-cp312-macosx_14_0_arm64.whl
Size 208.1 kB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
4ee5a415bd7f635689efbd099621e57a6694e05ad8a13d6a7a6895494b2fa90c
BLAKE2b-256 checksum
How to use checksums
232068472896b74e63df8fd7ab4704ba7581355dbe41bb1cf8a44db0bb09faf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / chytorch_synplan-1.70-cp311-cp311-win_amd64.whl

Download URL chytorch_synplan-1.70-cp311-cp311-win_amd64.whl
Size 132.4 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
5bf015d03e4a66478b34324f0421dcf8f959f74749f94ff933b0374e268657e8
BLAKE2b-256 checksum
How to use checksums
33fd7819a21298db0c22318d805dd6f3d57e80c00e8c20ac92b7d3dee72c9d80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / chytorch_synplan-1.70-cp311-cp311-win32.whl

Download URL chytorch_synplan-1.70-cp311-cp311-win32.whl
Size 121.0 kB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
d35567865a39211d54792236dc2049814caf51554ef8474cd12b213998eecc5a
BLAKE2b-256 checksum
How to use checksums
cbe5db9ee76d9854b48b231d3a48b3d1b80cd476384b521e963c49e2eeadf5e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / chytorch_synplan-1.70-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL chytorch_synplan-1.70-cp311-cp311-manylinux_2_28_x86_64.whl
Size 725.2 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0de8be20c453dd6fb14617c3a542c0322a2b192228fd07cb71d5ad4ca60806a4
BLAKE2b-256 checksum
How to use checksums
f70fb443909ec9db98a7c83157c823e7e13b903b898b44807fac7b2aaafdc183
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / chytorch_synplan-1.70-cp311-cp311-macosx_14_0_arm64.whl

Download URL chytorch_synplan-1.70-cp311-cp311-macosx_14_0_arm64.whl
Size 207.3 kB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
7aed724851f96c57b9885625ee44044b1af0d21a8853ad4b6eaaec279caab23e
BLAKE2b-256 checksum
How to use checksums
3d403c178e6349ffc839e17f1c4e871afff64d35ecc2311d7197e374ac9b4cb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / chytorch_synplan-1.70-cp310-cp310-win_amd64.whl

Download URL chytorch_synplan-1.70-cp310-cp310-win_amd64.whl
Size 132.8 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
f47aab40ff2a36e9ce6fd2c439c9f420752415d7778d62f7e28b8a7ea467f88a
BLAKE2b-256 checksum
How to use checksums
0b01c70e925cc95426edf6975d1ff2bda66468c740767bc5e2ad7884088045bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / chytorch_synplan-1.70-cp310-cp310-win32.whl

Download URL chytorch_synplan-1.70-cp310-cp310-win32.whl
Size 121.3 kB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
fb8f3cb79e78e396870b8181299afc2caa92113bd01c157764d46c802422dafe
BLAKE2b-256 checksum
How to use checksums
137cd613d6b7515d418f942e1ec87d2488a0125c99c486d2286e12442616a5e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / chytorch_synplan-1.70-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL chytorch_synplan-1.70-cp310-cp310-manylinux_2_28_x86_64.whl
Size 699.7 kB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
84586ef7306a4363aa7fe7b7c8920059fda333db2cc61d5d0b5dc6abbd67b9fa
BLAKE2b-256 checksum
How to use checksums
7734cf989a3aaf61da4e52b96c5faa84b0641ab0e78e29ee008d5332845767e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release files / chytorch_synplan-1.70-cp310-cp310-macosx_14_0_arm64.whl

Download URL chytorch_synplan-1.70-cp310-cp310-macosx_14_0_arm64.whl
Size 208.6 kB
Tags CPython 3.10 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
c8c7e9341bdcf4f56f152e182f788d4e1fcde6337d50a65199ff6d534b807af6
BLAKE2b-256 checksum
How to use checksums
290af176f2f7e6c89c0bc7a7de76717e19c5b716a4436ab71f76d233dd4f3d95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

1.70 This release

20 release files

1.69

12 release files

1.68

9 release files

1.67

1 release file

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