{"id":15679436,"url":"https://github.com/superstar54/xespresso","last_synced_at":"2026-01-08T02:48:51.085Z","repository":{"id":45212654,"uuid":"283436536","full_name":"superstar54/xespresso","owner":"superstar54","description":"Quantum ESPRESSO Calculator for Atomic Simulation Environment (ASE).","archived":false,"fork":false,"pushed_at":"2023-07-15T12:37:17.000Z","size":111884,"stargazers_count":13,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-07T12:49:02.143Z","etag":null,"topics":["ase","dft","dos","neb","quantum-espresso"],"latest_commit_sha":null,"homepage":"https://xespresso.readthedocs.io/en/latest/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superstar54.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}},"created_at":"2020-07-29T08:00:42.000Z","updated_at":"2024-12-09T05:09:24.000Z","dependencies_parsed_at":"2023-02-01T02:15:45.197Z","dependency_job_id":"c0a30e0a-23f5-47fa-94c0-96fa3d66defb","html_url":"https://github.com/superstar54/xespresso","commit_stats":{"total_commits":76,"total_committers":4,"mean_commits":19.0,"dds":"0.10526315789473684","last_synced_commit":"7e0795d8c7cec0e0dfc4831861e4cb8653197cd7"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstar54%2Fxespresso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstar54%2Fxespresso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstar54%2Fxespresso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstar54%2Fxespresso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superstar54","download_url":"https://codeload.github.com/superstar54/xespresso/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246299462,"owners_count":20755165,"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":["ase","dft","dos","neb","quantum-espresso"],"created_at":"2024-10-03T16:30:51.765Z","updated_at":"2026-01-08T02:48:51.048Z","avatar_url":"https://github.com/superstar54.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## xespresso\n[![Unit test](https://github.com/superstar54/xespresso/actions/workflows/unit_test.yaml/badge.svg)](https://github.com/superstar54/xespresso/actions/workflows/unit_test.yaml)\n\nQuantum ESPRESSO Calculator for Atomic Simulation Environment (ASE).\n\nFor the introduction of ASE , please visit https://wiki.fysik.dtu.dk/ase/index.html\n\n\n### Features\n\n* Support all QE packages, including: pw, band, neb, dos, projwfc, pp ...\n* Spin-polarized calculation\n* LD(S)A+U\n* Automatic submit job\n* Automatic check a new calculation required or not\n* Automatic set up \"nscf\" calculation\n* Read and plot dos, pdos and layer resolved pdos\n* Plot NEB\n\n### Author\n* Xing Wang  \u003cxingwang1991@gmail.com\u003e\n\n### Dependencies\n\n* Python\n* ASE\n* numpy\n* scipy\n* matplotlib\n\n### Installation using pip\npip install --upgrade --user xespresso\n\n### Installation from source\nYou can get the source using git:\n``` sh\ngit clone --depth 1 https://github.com/superstar54/xespresso.git\n```\n\nAdd xespresso to your PYTHONPATH. On windows, you can edit the system environment variables.\n``` sh\nexport PYTHONPATH=\"/path/to/xespresso\":$PYTHONPATH\nexport ASE_ESPRESSO_COMMAND=\"/path/to/PACKAGE.x  PARALLEL  -in  PREFIX.PACKAGEi  \u003e  PREFIX.PACKAGEo\"\nexport ESPRESSO_PSEUDO=\"/path/to/pseudo\"\n```\n\n\n### Examples\n\n#### Automatic submit job\n\nA example of setting parameters for the queue. See example/queue.py\n\n``` python\nqueue = {'nodes': 4,\n         'ntasks-per-node': 20,\n         'partition': 'all',\n         'time': '23:10:00'}\ncalc = Espresso(queue = queue)\n```\n\n\n\n\n#### Automatic check a new calculation required or not\n\nBefore the calculation, it will first check the working directory. If the same geometry and parameters are used, try to check whether the results are available or not. Automatic check input parameters with Quantum Espresso document.\n\n``` python\ncalc = Espresso(label = 'scf/fe')\n```\n\n#### Show debug information.\n\n``` python\ncalc = Espresso(debug = True)\n```\n\n#### Add new species\nSome atoms are special:\n+ atoms with different starting_magnetization\n+ atoms with different U values\n+ atoms with special basis set\n\nFor example, Fe with spin state AFM. See example/spin.py\n\n``` python\natoms.new_array('species', np.array(atoms.get_chemical_symbols(), dtype = 'U20'))\natoms.arrays['species'][1] = 'Fe1'\n```\n\n#### Setting parameters with \"(i), i=1,ntyp\"\nHubbard, starting_magnetization, starting_charge and so on. See example/dft+u.py\n\n``` python\ninput_ntyp = {\n'starting_magnetization': {'Fe1': 1.0, 'Fe2': -1.0},\n'Hubbard_U': {'Fe1': 3.0, 'Fe2': 3.0},\n}\ninput_data['input_ntyp'] = input_ntyp,\n```\n\n#### Setting parameters for \"Hubbard_V(na,nb,k)\"\nHubbard, starting_magnetization, starting_charge and so on. See example/dft+u.py\n\n``` python\ninput_data = {\n'hubbard_v': {'(1,1,1)': 4.0, '(3,3,1)': 1.0},\n}\n```\n\n#### Control parallelization levels\nTo control the number of processors in each group: -ni,\n-nk, -nb, -nt, -nd) are used.\n\n``` python\ncalc = Espresso(pseudopotentials = pseudopotentials,\n                 package = 'pw',\n                 parallel = '-nk 2 -nt 4 -nd 144',  # parallel parameters\n                 }\n```\n\n#### Non self-consistent calculation\n\nA example of nscf calculation following the above one.\n\n``` python\n# start nscf calculation\nfrom xespresso.post.nscf import EspressoNscf\nnscf = EspressoNscf(calc.directory, prefix = calc.prefix,\n                occupations = 'tetrahedra',\n                kpts = (2, 2, 2),\n                debug = True,\n                )\nnscf.run()\n```\n\n#### Calculate dos and pdos\n\nA example of calculating and plotting the pdos from the nscf calculation.\n\n``` python\nfrom xespresso.post.dos import EspressoDos\n# dos\ndos = EspressoDos(parent_directory = 'calculations/scf/co',\n            prefix = calc.prefix,\n            Emin = fe - 30, Emax = fe + 30, DeltaE = 0.01)\ndos.run()\n# pdos\nfrom xespresso.post.projwfc import EspressoProjwfc\nprojwfc = EspressoProjwfc(parent_directory = 'calculations/scf/co',\n            prefix = 'co',\n            DeltaE = 0.01)\nprojwfc.run()\n```\n\u003cimg src=\"docs/source/_static/images/co-pdos.png\" width=\"500\"/\u003e\n\n#### Calculate work function\n``` python\nfrom xespresso.post.pp import EspressoPp\npp = EspressoPp(calc.directory, prefix = calc.prefix,\n                plot_num = 11,\n                fileout = 'potential.cube',\n                iflag = 3,\n                output_format=6,\n                debug = True,\n                )\npp.get_work_function()\n```\n\n#### Restart from previous calculation\n``` python\ncalc.read_results()\natoms = calc.results['atoms']\ncalc.run(atoms = atoms, restart = 1)\n```\n\n#### NEB calculation\nSee example/neb.py\n``` python\nfrom xespresso.neb import NEBEspresso\ncalc = NEBEspresso(\n                 package = 'neb',\n                 images = images,\n                 climbing_images = [5],\n                 path_data = path_data\n                 )\ncalc.calculate()\ncalc.read_results()\ncalc.plot()\n```\n\u003cimg src=\"docs/source/_static/images/neb.png\" width=\"500\"/\u003e\n\n\n## Workflow\n### Oxygen evolution reaction (OER) calculation\n\nThe workflow includes four modules:\n* OER_bulk\n* OER_pourbaix\n* OER_surface\n* OER_site\n\n\nThe workflow can handle:\n* Generate surface slab model from bulk structure\n* Determine the surface adsorption site\n* Determine the surface coverage(*, O*, OH*), Pourbaix diagram\n* Calculate the Zero-point energy\n\n\n```python\noer = OER_site(slab,\n               label = 'oer/Pt-001-ontop',\n               site_type = 'ontop',\n               site = -1,\n               height=2.0,\n\t           calculator = parameters,\n               molecule_energies = molecule_energies,\n               )\noer.run()\n```\n\n### To do lists:\n* add `qPointsSpecs` and `Line-of-input` for phonon input file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperstar54%2Fxespresso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperstar54%2Fxespresso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperstar54%2Fxespresso/lists"}