Skip to main content

BESMARTS

A toolkit for data-driven force field design based on binary-encoded SMARTS

Highlights of this package are:

  • Map and perform bitwise operations between two molecular substructures of arbitrary size
  • Search/iterate a substructure at the SMARTS-primitive level, using both numerical and analytic approaches
  • Cluster molecular data by SMARTS using a SMARTS hierarchy
  • Calculate energy and gradients using a classical force field based on (a basic implementation of) the SMIRNOFF format
  • Geometry optimization
  • Force field parameter optimization (under development)

See the ChemRxiv preprint for the theoretical unpinnings on which this package is based.

Installation

Currently, the best way to install is to clone and then install with pip.

For environment users (e.g. venv or conda), one should probably create an empty environment first:

conda create -n besmarts python
conda activate besmarts

or

python -m venv besmarts
. besmarts/bin/activate

followed by the actual install:

git clone https://github.com/trevorgokey/besmarts besmarts-git
cd besmarts-git/besmarts-core/python
python -m pip install .
cd ../../besmarts-rdkit/python
python -m pip install .

RDKit is needed to decode SMILES into graphs and offers a faster implementation of SMARTS matching when labeling from a SMARTS hierarchy.

Geometry optimization uses the SciPy minimizer and can be installed using using a similar process as above with besmarts-scipy. There is also an interface to OpenMM and this minimizer can be used instead after installing besmarts-openmm. The OpenMM plugin is quite a bit faster and is recommended if large or heavily numerical computations are needed (e.g. fitting frequencies from calculating MM Hessians with finite differences). The native interface to calculating energies and gradients is useful if novel functional forms are needed and not in standard packages (e.g. OpenMM). We recommend using OpenMM if it is supported and available on your system. The energies, hessians, and gradients compared between the native and OpenMM implementations are nearly exact; for energy/gradient down to 12 decimal places for linear terms, around 6 places for torsions, and between 4-12 places for Hessians.

Molecular mechanics energy and gradient evaluations are implemented, but require partial charges. By default, besmarts will try to charge molecules with am1bcc using the sqm program from ambertools suite. Consequently, make sure sqm is in your PATH by installing via conda or by other means.

Documentation

Documentation in this repository is hosted on RTD

Contributing

Contributions in the form of bug reports, enhancements, and general discussions are very welcome. See CONTRIBUTING.md for more details.

Metadata

Release files for besmarts 0.1.0

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

Source distribution (sdist)

Source distribution for besmarts 0.1.0
File Size Uploaded
besmarts-0.1.0.tar.gz 198.6 kB Details

Built distribution (wheel)

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

Total release size: 339.7 kB

Release files / besmarts-0.1.0.tar.gz

Download URL besmarts-0.1.0.tar.gz
Size 198.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e6037bbb44da9172e63ab0df94bfb7a2b52020a941b8cbad92345bf21daa61f1
BLAKE2b-256 checksum
How to use checksums
2b7a3b4bd656ff404f49f5c270165203e36723ab0b76faa5e17138cf6b09ad5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / besmarts-0.1.0-py3-none-any.whl

Download URL besmarts-0.1.0-py3-none-any.whl
Size 141.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33dfc71b9d4eac89d31e426a666b3c5c851c795334a56953e37740a6f0b6d069
BLAKE2b-256 checksum
How to use checksums
dfd383d73b44c091661b53d230029bcffb9e758d98baf088bccd5b1b9d7348cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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