{"id":18437647,"url":"https://github.com/aiidaplugins/aiida-ase","last_synced_at":"2025-04-07T20:34:30.441Z","repository":{"id":46114269,"uuid":"101804714","full_name":"aiidaplugins/aiida-ase","owner":"aiidaplugins","description":"AiiDA plugin for ASE","archived":false,"fork":false,"pushed_at":"2024-09-05T19:02:51.000Z","size":155,"stargazers_count":5,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-10T02:55:34.074Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aiidaplugins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-29T20:37:31.000Z","updated_at":"2024-09-21T15:47:03.000Z","dependencies_parsed_at":"2022-08-20T11:50:50.653Z","dependency_job_id":null,"html_url":"https://github.com/aiidaplugins/aiida-ase","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiidaplugins%2Faiida-ase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiidaplugins%2Faiida-ase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiidaplugins%2Faiida-ase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiidaplugins%2Faiida-ase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aiidaplugins","download_url":"https://codeload.github.com/aiidaplugins/aiida-ase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223291537,"owners_count":17120965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T06:15:42.326Z","updated_at":"2024-11-06T06:15:42.840Z","avatar_url":"https://github.com/aiidaplugins.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiidaplugins%2Faiida-ase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faiidaplugins%2Faiida-ase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiidaplugins%2Faiida-ase/lists"}