Skip to main content

An async wrapper for ASE

Project description

ASE-Grain

Docs PyPI version

An async wrapper for ASE, adapting the calculators into Grain-compatible jobs.

Supported calculators

  • Gaussian
  • Psi4
  • ORCA
  • Quantum Espresso

Quickstart

pip install ase-grain

Want to try out the tasklets without running a Grain mission? Easy:

from ase_grain import gautask, psi4task

from grain.subproc import subprocess_pool_scope
from grain import GVAR
from grain.resource import Node

import trio

async def main():
    async with subprocess_pool_scope(): # only needed for Psi4
        GVAR.res = Node(N=[0,1,2,3],M=1) # 4 processors, 1 GB memory
        e, f = await psi4task("test", "b3lyp/6-31++g(d,p)", 
        #e, f = await gautask("test", "b3lyp/6-31++g(d,p)",
            (0, 1),
            [[-4.546300, 0.811495, -1.302550],
             [-3.783370, 1.116810, -1.871810],
             [-3.418490, 0.344640, -2.321040]],
            [1, 8, 1], # a water molecule
        )
        print(e)
        print(f)

trio.run(main)

This also demonstrates that you can use ASE-Grain outside a Grain scheduler, more specifically, in any Trio-based async environment with Grain's context variables (GVAR).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ase-grain-0.1.4.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

ase_grain-0.1.4-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file ase-grain-0.1.4.tar.gz.

File metadata

  • Download URL: ase-grain-0.1.4.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for ase-grain-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6afc34b469b7e1455caf3584bd8a879d79a70de4ff1f4051bc58e9778bf6e69b
MD5 5fa14cffc262babb9d1879b713824971
BLAKE2b-256 6f01a8cf31a292ce62a4b5efbfefd7ff4248bfd309bc385bd30087e5ee7ba65b

See more details on using hashes here.

File details

Details for the file ase_grain-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: ase_grain-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for ase_grain-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f49e548a5596b4fb356ede6aed26ac0f57399b5e55206096bffe3ef2ac2871c5
MD5 7849f1e2d5e547889a89b007e82e0d06
BLAKE2b-256 d95d3bb061d6be4e816219c901334b34c8927dca79bf30ccb047168cb4e7c223

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page