Giter Club home page Giter Club logo

ase-grain's Introduction

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.