aiida-ase


Nameaiida-ase JSON
Version 3.0.0 PyPI version JSON
download
home_pageNone
SummaryThe official AiiDA plugin for ASE.
upload_time2023-10-04 14:17:48
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords aiida workflows ase
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # `aiida-ase`
AiiDA plugin for ASE

# Installation

1. From PyPI

```
pip install aiida-ase
```

2. From this repository (useful for development):

```
git clone https://github.com/aiidateam/aiida-ase
pip install -e aiida-ase
```

# Usage

The main goal of this plugin is to be a wrap around for ASE.

To make it easy to setup the calculation generate a `builder` as follows

```
AseCalculation = CalculationFactory('ase.ase')
builder = AseCalculation.get_builder()
```

The main parameters for the builder that need to be specified are:

1. Code

```
from aiida.orm import load_code
code = load_code('your-code-here@your-computer-here')
builder.code = code
```
NOTE: If using GPAW, there are two possibilities to set up the calculator
	a. Specify the Python executable with specific module loaded for GPAW
	b. Specify directly the GPAW executable. In this case a CMDLINE parameter will be needed (see below).

2. Structure
```
builder.structure = structure
```

3. _k_-points data
```
kpoints = KpointsData()
kpoints.set_kpoints_mesh([2,2,2])  # choose the right mesh here
builder.kpoints = kpoints
```

4. Parameters

An example parameter set for GPAW is shown here in parts. See the `examples` folder for specific examples for other functionality (will be constantly updated).

Define a calculator for a `PW` calculation with GPAW. Here the `name` of the calculator is set to GPAW, `args` is the equivalent of arguments passed into the calculator used in ASE. Note that the `@function` functionality enables passing arguments to a function inside the calculators. In this example the equivalent ASE command is `PW(300)`. Other arguments such as `convergence` and `occupations` can be added.
```
calculator = {
    'name': 'gpaw',
    'args': {
    'mode': {
        '@function': 'PW',
        'args': {'ecut': 300}
    },
    'convergence': {
        'energy': 1e-9
    },
    'occupations': {
        'name': 'fermi-dirac',
        'width':0.05
    }
}
```

Add here tags that will be written as `atoms.get_xyz()`, so for example the first item will be `atoms.get_temperature()`.
```
atoms_getters = [
    'temperature',
    ['forces', {'apply_constraint': True}],
    ['masses', {}],
]
```

Some addition utility functions are:

1. `pre_lines`: list of lines to added to the start of the python file
2. `post_lines`: list of lines to added to the end of the python file
3. `extra_imports`: list of extra imports as separated strings, for example `["numpy", "array"]` will lead to `from numpy import array`

# Note about choosing a code

1. If using GPAW it is possible to run parallel calculations using `/path/to/execut/gpaw python run_gpaw.py`. Set up the code through AiiDA by adding in the `gpaw` executable. The add the `python` tag using the command line option
```
settings = {'CMDLINE': ['python']}
builder.settings = orm.Dict(settings)
```

2. If the code you are interested in is present in this plugin registry it might make more sense to use that https://aiidateam.github.io/aiida-registry/


# Documentation
The documentation for this package can be found on Read the Docs at
http://aiida-ase.readthedocs.io/en/latest/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "aiida-ase",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "aiida,workflows,ase",
    "author": null,
    "author_email": "The AiiDA team <developers@aiida.net>",
    "download_url": "https://files.pythonhosted.org/packages/7e/7f/33e7675a1189ec856c2146d97286545a3a4624eda688647d0829eccc3773/aiida_ase-3.0.0.tar.gz",
    "platform": null,
    "description": "# `aiida-ase`\nAiiDA plugin for ASE\n\n# Installation\n\n1. From PyPI\n\n```\npip install aiida-ase\n```\n\n2. From this repository (useful for development):\n\n```\ngit clone https://github.com/aiidateam/aiida-ase\npip install -e aiida-ase\n```\n\n# Usage\n\nThe main goal of this plugin is to be a wrap around for ASE.\n\nTo make it easy to setup the calculation generate a `builder` as follows\n\n```\nAseCalculation = CalculationFactory('ase.ase')\nbuilder = AseCalculation.get_builder()\n```\n\nThe main parameters for the builder that need to be specified are:\n\n1. Code\n\n```\nfrom aiida.orm import load_code\ncode = load_code('your-code-here@your-computer-here')\nbuilder.code = code\n```\nNOTE: If using GPAW, there are two possibilities to set up the calculator\n\ta. Specify the Python executable with specific module loaded for GPAW\n\tb. Specify directly the GPAW executable. In this case a CMDLINE parameter will be needed (see below).\n\n2. Structure\n```\nbuilder.structure = structure\n```\n\n3. _k_-points data\n```\nkpoints = KpointsData()\nkpoints.set_kpoints_mesh([2,2,2])  # choose the right mesh here\nbuilder.kpoints = kpoints\n```\n\n4. Parameters\n\nAn example parameter set for GPAW is shown here in parts. See the `examples` folder for specific examples for other functionality (will be constantly updated).\n\nDefine a calculator for a `PW` calculation with GPAW. Here the `name` of the calculator is set to GPAW, `args` is the equivalent of arguments passed into the calculator used in ASE. Note that the `@function` functionality enables passing arguments to a function inside the calculators. In this example the equivalent ASE command is `PW(300)`. Other arguments such as `convergence` and `occupations` can be added.\n```\ncalculator = {\n    'name': 'gpaw',\n    'args': {\n    'mode': {\n        '@function': 'PW',\n        'args': {'ecut': 300}\n    },\n    'convergence': {\n        'energy': 1e-9\n    },\n    'occupations': {\n        'name': 'fermi-dirac',\n        'width':0.05\n    }\n}\n```\n\nAdd here tags that will be written as `atoms.get_xyz()`, so for example the first item will be `atoms.get_temperature()`.\n```\natoms_getters = [\n    'temperature',\n    ['forces', {'apply_constraint': True}],\n    ['masses', {}],\n]\n```\n\nSome addition utility functions are:\n\n1. `pre_lines`: list of lines to added to the start of the python file\n2. `post_lines`: list of lines to added to the end of the python file\n3. `extra_imports`: list of extra imports as separated strings, for example `[\"numpy\", \"array\"]` will lead to `from numpy import array`\n\n# Note about choosing a code\n\n1. If using GPAW it is possible to run parallel calculations using `/path/to/execut/gpaw python run_gpaw.py`. Set up the code through AiiDA by adding in the `gpaw` executable. The add the `python` tag using the command line option\n```\nsettings = {'CMDLINE': ['python']}\nbuilder.settings = orm.Dict(settings)\n```\n\n2. If the code you are interested in is present in this plugin registry it might make more sense to use that https://aiidateam.github.io/aiida-registry/\n\n\n# Documentation\nThe documentation for this package can be found on Read the Docs at\nhttp://aiida-ase.readthedocs.io/en/latest/\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "The official AiiDA plugin for ASE.",
    "version": "3.0.0",
    "project_urls": {
        "Source": "https://github.com/aiidaplugins/aiida-ase"
    },
    "split_keywords": [
        "aiida",
        "workflows",
        "ase"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4af776e4a264be68d3007c640be2b09119c96387c8b47811c0edff27b53b29ba",
                "md5": "1785563f5b7b2e6804a05cf35c083885",
                "sha256": "be182f2960fd3ebcf9f4365d2d19a28f97e74c766f85572f552c10e014f22748"
            },
            "downloads": -1,
            "filename": "aiida_ase-3.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1785563f5b7b2e6804a05cf35c083885",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 15202,
            "upload_time": "2023-10-04T14:17:46",
            "upload_time_iso_8601": "2023-10-04T14:17:46.752366Z",
            "url": "https://files.pythonhosted.org/packages/4a/f7/76e4a264be68d3007c640be2b09119c96387c8b47811c0edff27b53b29ba/aiida_ase-3.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7e7f33e7675a1189ec856c2146d97286545a3a4624eda688647d0829eccc3773",
                "md5": "362ec0bc51948f8462d1ea8b3b347f39",
                "sha256": "efbe8647590be1003f2d9f21239932fbb7f4881ebc8785a03e9d547ace550f61"
            },
            "downloads": -1,
            "filename": "aiida_ase-3.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "362ec0bc51948f8462d1ea8b3b347f39",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 15516,
            "upload_time": "2023-10-04T14:17:48",
            "upload_time_iso_8601": "2023-10-04T14:17:48.123879Z",
            "url": "https://files.pythonhosted.org/packages/7e/7f/33e7675a1189ec856c2146d97286545a3a4624eda688647d0829eccc3773/aiida_ase-3.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-04 14:17:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aiidaplugins",
    "github_project": "aiida-ase",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "aiida-ase"
}
        
Elapsed time: 0.13281s