{"library":"nvalchemi-toolkit-ops","title":"NVALCHEMY Toolkit Ops","description":"NVALCHEMY Toolkit Ops (pypi: `nvalchemi-toolkit-ops`) is a Python library providing high-performance NVIDIA Warp primitives for GPU-enabled computational chemistry and atomistic simulation workflows. It leverages NVIDIA Warp for accelerated calculations. As of version 0.3.1, it is under active development with frequent minor and patch releases, often introducing new features and refactorings.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install nvalchemi-toolkit-ops"],"cli":null},"imports":["from toolkit_ops.mol_geom import get_bond_length","import warp as wp","from toolkit_ops import forcefield"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import warp as wp\nfrom toolkit_ops.mol_geom import get_bond_length\nimport numpy as np\n\n# Initialize Warp (requires an NVIDIA GPU and CUDA setup)\ntry:\n    wp.init()\nexcept Exception as e:\n    print(f\"Warning: Could not initialize Warp. GPU operations will fail: {e}\")\n    # In a real application, you might exit or provide fallback CPU logic here.\n\n# Example usage:\npositions_np = np.array([\n    [0.0, 0.0, 0.0],\n    [1.0, 0.0, 0.0]\n], dtype=np.float32)\n# Convert numpy array to Warp array\npositions = wp.array(positions_np, dtype=wp.vec3)\n\n# Calculate bond length\nbond_length = get_bond_length(positions, index_0=0, index_1=1)\n\nprint(f\"Calculated bond length: {bond_length.numpy()}\")","lang":"python","description":"This quickstart demonstrates calculating a bond length using `toolkit_ops.mol_geom.get_bond_length`. It initializes NVIDIA Warp, converts a NumPy array of atomic positions to a Warp array, and then performs the calculation. An NVIDIA GPU and CUDA are required for `wp.init()` to succeed.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}