Grain-ready tasklets

General interface

async def Xtask(
    cid:     str,                   # calculation id (input, log files name after it)
    mb:      str,                   # "{method}/{basis}"
    chg_mlt: (int, int),            # charge and multiplicity
    atcor:   ndarray[(N,3), float], # atom coordinates
    ian:     ndarray[(N,), int],    # corresponding atomic number
    ...
) -> (energy: float, forces: ndarray[(N,3), float])

The energy is in hartree and forces in hartree/angstrom. The following reference lists additional parameters specific to each backend.

await ase_grain.tasks.gautask(cid, mb, chg_mlt, atcor, ian, cell=None, pbc=None, gau='g16', scrmem=0, **kwargs)
Parameters:
  • cell (ndarray[(3,3), float] or see ASE doc) – Unit cell size. Arg for ase.atoms.Atoms
  • pbc (bool or (bool, bool, bool)) – Periodic boundary conditions along each axis. Arg for ase.atoms.Atoms
  • gau (str) – the Gaussian executable
  • scrmem (int) – memory (in GB), out of the total memory allocated, for scratch dir on a memory fs.

Any other keyword args are treated as Link0 or route keywords. See ASE’s Gaussian calculator for reference.

await ase_grain.tasks.psi4task(cid, mb, chg_mlt, atcor, ian)

psi4task() is implemented using grain.subproc.subprocify For notes and caveats refer to the base task ase_grain.base.ase_task() or subprocify’s documentation.

await ase_grain.tasks.orcatask(cid, mb, chg_mlt, atcor, ian, orca='', simple='', block='')
Parameters:
  • orca (str) – the ORCA executable
  • simple (str) – additional SimpleInput beside method and basis
  • block (str) – additional BlockInput beside pal and maxcore

Per ASE’s ORCA interface, the ORCA executable can also be set by envar ORCA_COMMAND. This tasklet depends on OpenMPI >= 4.0 for parallelization.

await ase_grain.tasks.qetask(cid, atcor, ian, cell, pseudopotentials, kspacing=None, kpts=None, koffset=(0, 0, 0), input_data=None, mpi='Open MPI', **kwargs)

QE is very different from other backends. See ASE’s Espresso calculator for reference.

Parameters:
  • cell (ndarray[(3,3), float]) – Unit cell vectors. This is passed to ase.atoms.Atoms
  • mpi (str) – Whether to use Open MPI or Intel MPI

Note

Currently there is no way to impose a memory constraint on QE. Please measure ahead the memory consumption for your calculation, and use that value to inform the scheduler. There is no guarentee for QE to go over that value, so you might want to set a higher one.