Skip to main content

comparemol

This package is used to compare if two molecules are equivalent.

Installation

This package requires Python 3.8.

pip install comparemol

Usage

Compare if two molecules are equivalent

from comparemol import Mol
# define types and coordinates
types1 = [0, 0]
types2 = [0, 0]
coords1 = [[0.0, 0.0, 0.0], [1.0, 1.0, 1.0]]
coords2 = [[0.0, 0.0, 0.0], [1.73205081, 0.0, 0.0]]
# define two molecules
mol1 = Mol(types1, coords1)
mol2 = Mol(types2, coords2)
# compare whether they are equivalent
assert mol1 == mol2

Rotate forces to match coordinates

from comparemol import get_rotation
# define rotation: mol2 -> mol1
r = get_rotation(mol1, mol2)
# rotate forces
force2 = [[1.73205081, 0.0, 0.0]]
force1 = r.apply(force2)

Load from a dpdata System

Load a molecule from a dpdata System:

from comparemol import Mol
# system: dpdata.System
mol = Mol.load_from_dpdata(system)

Note that only the first frame is loaded.

Metadata

Release files for comparemol 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 comparemol 0.0.2
File Size Uploaded Provenance
comparemol-0.0.2.tar.gz 10.4 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 20.2 kB

Release files / comparemol-0.0.2.tar.gz

Download URL comparemol-0.0.2.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0afb26d6a98c2c2d7821abc5e8aa344dc405794f13bcab135fa67559169dd060
BLAKE2b-256 checksum
How to use checksums
dc09c499175e96c7d6e7c123a4048d7de6c5380ab19d53a2ff51c63eb7b0bca2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

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

Download URL comparemol-0.0.2-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59b989bb161f20f41ad239a079d1692268fe7f98d5ef8c969a61dbc751322cea
BLAKE2b-256 checksum
How to use checksums
4cef603db62a96072e55ee4e50a0fccad1176fee8573dde4abb0534cdc9fe053
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Security for comparemol 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.

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