{"id":18774913,"url":"https://github.com/unkcpz/aiida-ce","last_synced_at":"2025-04-13T09:21:56.193Z","repository":{"id":104984207,"uuid":"192313519","full_name":"unkcpz/aiida-ce","owner":"unkcpz","description":"AiiDA plugin for running cluster expansion using icet and ATAT.","archived":false,"fork":false,"pushed_at":"2021-07-01T07:24:30.000Z","size":385,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-27T00:54:57.218Z","etag":null,"topics":["aiida-plugin","cluster-expansion","icet"],"latest_commit_sha":null,"homepage":"","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/unkcpz.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-17T09:10:50.000Z","updated_at":"2023-02-21T03:27:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc144059-6f43-4d03-9ed4-53748167b75e","html_url":"https://github.com/unkcpz/aiida-ce","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unkcpz%2Faiida-ce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unkcpz%2Faiida-ce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unkcpz%2Faiida-ce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unkcpz%2Faiida-ce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unkcpz","download_url":"https://codeload.github.com/unkcpz/aiida-ce/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248689377,"owners_count":21145923,"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":["aiida-plugin","cluster-expansion","icet"],"created_at":"2024-11-07T19:39:47.287Z","updated_at":"2025-04-13T09:21:56.165Z","avatar_url":"https://github.com/unkcpz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aiida-ce\n\nThe aiida-ce is an aiida plugin for icet and ATAT to:\n\n1. Training the cluster expansion (icet only)\n2. Generating Special Quasi-random Structure (SQS). (icet and `mcsqs` from ATAT)\n3. Enumerating unduplicated structures for cluster expansion. (coming, using icet and [enumlib](https://github.com/msg-byu/enumlib))\n4. Sampling the cluster expansion using Monte Carlo simulation at different ensembles (coming)\n5. Giving the phase diagram of simple alloy, include running the property (energy only) evaluation of structures with aiida-common-workflow. (coming)\n\nThe plugin in going to provide all the functions displayed in [tutorials of icet](https://icet.materialsmodeling.org/tutorial/index.html).\nMoreover, it can be used to complete a throught cluster expansion study on alloy systems.\n\n## data type\n  * `StructureDBData` is to represent a collection of structures with their properties (mostly the energies, if given). Structures are stored as a ase database with sqllite in the aiida file repository. This data type is the input of the cluster expansion training if the properties of the structures are also stored. If the properties are not calculated, this data type is the input of a energy evaluation workflow which give a `StructureDBData` as output with all structures tagged with their evaluated energies.\n\n  ```python\n  StructureDBData = DataFactory('structure_db')\n  ```\n\n  * `ClusterSpaceData` is a data type to represent the cluster information used in the cluster expansion process.\n  ```python\n  ClusterSpaceData = DataFactory('cluster_space')\n  ```\n\n  * `ClusterExpansioneData` is a data type to represent the cluster expansion information. It can be used to predict the energy of specific configurations.\n  ```python\n  ClusterExpansionData = DataFactory('cluster_expansion')\n  ```\n\n## Usage\n\n### Special Quasi-random Structure (SQS)\n\nThe SQS generation is implement for both icet and ATAT. Since icet is a python library the engine to generate SQS is installed as a library with `aiida-ce` plugin, this makes running a long time calculation become unfeasiable. If you are going to generating SQS with big supercell and long distance cutoff, it is strongly recommend to run SQS with the `mcsqs` engine by `AtatMcsqsCalculation`.\n\nHere is a simple example of generating SQS with icet engine:\n```python\nfrom aiida import orm\nfrom aiida.engine import run_get_node\nfrom aiida.plugins import WorkflowFactory, DataFactory\n\nfrom ase.build import bulk\n\nClusterExpansionData = DataFactory('cluster_expansion')\nIcetSqsWorkChain = WorkflowFactory('icet.sqs')\n\ncluster_space_data = ClusterSpaceData()\ncluster_space_data.set(ase=bulk('Au'),\n                      cutoffs=[7.0, 4.5],\n                      chemical_symbols=[['Au', 'Pd']])\n\nsupercell = orm.StructureData(ase=generate_ase_structure('Au1x2x4'))\n\ninputs = {\n    'cluster_space': cluster_space_data,\n    'supercell': supercell,\n    'n_steps': orm.Int(1000),\n    'random_seed': orm.Int(1234),\n    'target_concentrations': orm.Dict(dict={'Au': 0.5, 'Pd': 0.5})\n}\n\nres, node = run_get_node(IcetSqsWorkChain, **inputs)\nsqs = res['output_structure']\n```\n\nIn the example above, user create a cluster space which contain the cluster information for further calculation, and then running sqs process to get the best sqs structure in a 1x2x4 supercell.\n\nHere is a example of generating SQS with ATAT's `mcsqs` engine:\n```python\nfrom aiida import orm\nfrom aiida.plugins import CalculationFactory\n\nMcsqsCalculation = CalculationFactory('atat.mcsqs')\n\nprimitive_structure = orm.StructureData(cell=[[1.,0,0],[0.5,0.866,0,],[0.,0.,1.63333]])\nprimitive_structure.append_atom(position=[0.,0.,0.], symbols=['Ni', 'Fe'], weights=[0.5,0.5], name='NiFe1')\nprimitive_structure.append_atom(position=[0.,0.57735,0.81666], symbols=['Ni', 'Fe'], weights=[0.5,0.5], name='NiFe2')\n\nsupercell = orm.StructureData(cell=[[2., 0., 0.], [1., 1.7321, 0.], [0., 0., 3.26666]])\n\ninputs = {\n    'code': \u003ccode atat.mcsqs\u003e,\n    'code_corrdump': \u003ccode atat.corrdump\u003e,\n    'primitive_structure': primitive_structure,\n    'sqscell': supercell,\n}\n\nres, node = run_get_node(McsqsCalculation, **inputs)\nsqs = res['bestcorr']\n```\n\n### Evaluation the properties(energies only) of structures for cluster expansion\n\n### Running cluster expansion and predict energy of a given configuration\n\n## Installation\n\n```shell\npip install aiida-ce\nverdi quicksetup  # better to set up a new profile\nverdi plugin list aiida.calculations  # should now show your calclulation plugins\n```\n\n## Development\n\n```shell\ngit clone https://github.com/unkcpz/aiida-ce .\ncd aiida-ce\npip install -e .[pre-commit,testing]  # install extra dependencies\npre-commit install  # install pre-commit hooks\npytest -v  # discover and run all tests\n```\n\nSee the [developer guide](http://aiida-ce.readthedocs.io/en/latest/developer_guide/index.html) for more information.\n\n## License\n\nMIT\n\n\n## Contact\n\nmorty.yeu@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funkcpz%2Faiida-ce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funkcpz%2Faiida-ce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funkcpz%2Faiida-ce/lists"}