Skip to main content

dpdata_qdpi

dpdata plugin for QDπ.

Features

  • qdpi driver

Installation

If you have installed DeePMD-kit,

pip install dpdata_qdpi

Otherwise, add gpu or cpu to install DeePMD-kit:

pip install dpdata_qdpi[gpu]
# or for the CPU version of TensorFlow
pip install dpdata_qdpi[cpu]

At this time, you need to install either AMBERTools SQM (sqm) or DFTB+ (dftb+).

conda install ambertools -c conda-forge
# OR
conda install dftbplus dftbplus-python -c conda-forge

Usage

Download the QDπ model from RutgersLBSR/qdpi.

from dpdata_qdpi import QDPiDriver

qdpi = QDPiDriver(
    model="qdpi-1.0.pb",
    charge=0,
    backend="sqm",
)

backend can be either sqm, dftb+, or dftb+api.

Assume you have an XYZ file ch4.xyz

5

C          0.92334        0.06202        0.01660
H          2.01554        0.06202        0.01660
H          0.55927        1.09164        0.03247
H          0.55927       -0.46653        0.90033
H          0.55927       -0.43903       -0.88301

Load the structure:

from dpdata import System

ch4 = System("ch4.xyz")

Perform single point calculation using the QDπ model:

p = ch4.predict(driver=qdpi)
print("Energies:", p["energies"][0])
print("Forces:", p["forces"][0])
Energies: -1102.0472189112793
Forces: [[-4.92853860e-05  3.71129259e-04 -1.00154387e-04]
 [ 2.07637527e-02 -1.98691092e-06 -7.85158242e-07]
 [-6.81949398e-03  1.93688568e-02  3.32209598e-04]
 [-6.96972976e-03 -1.01335356e-02  1.69318148e-02]
 [-6.92524354e-03 -9.60446352e-03 -1.71630849e-02]]

Or do an optimization:

from dpdata.plugins.ase import ASEMinimizer

lbfgs = ASEMinimizer(
    driver=qdpi,
)
p = ch4.minimize(minimizer=lbfgs)
print("Coordinates:", p["coords"][0])
print("Energies:", p["energies"][0])
print("Forces:", p["forces"][0])
Coordinates: [[ 0.92333966  0.06202338  0.01659862]
 [ 2.0161223   0.06202041  0.0165999 ]
 [ 0.55907714  1.0921887   0.03247964]
 [ 0.559075   -0.46681303  0.9008036 ]
 [ 0.5590758  -0.43929946 -0.88349175]]
Energies: -1102.0472
Forces: [[-1.0836746e-04  9.8321143e-05 -2.5905898e-05]
 [ 6.7257555e-05  8.3519126e-06 -2.5666191e-06]
 [ 4.4526685e-05 -5.3852447e-05  1.7676884e-05]
 [-9.4877823e-06 -1.9283394e-05  2.8249622e-05]
 [ 6.0710017e-06 -3.3537217e-05 -1.7453991e-05]]

Read dpdata's documentation for more usage of dpdata.

Metadata

Release files for dpdata-qdpi 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 dpdata-qdpi 0.0.2
File Size Uploaded Provenance
dpdata_qdpi-0.0.2.tar.gz 14.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 25.9 kB

Release files / dpdata_qdpi-0.0.2.tar.gz

Download URL dpdata_qdpi-0.0.2.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
41e98e117af5e31fb558d09f2eb54aaab8dfce7f17bf6b5964419c3a11f530ab
BLAKE2b-256 checksum
How to use checksums
fd63e24ffa150be15bfbeaeca22d1dbcfd91f354d196401a956f97ae7b9a7ac1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

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

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

Security for dpdata-qdpi 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.

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