From d56b647a8782636feef0cee759426b4941d9477a Mon Sep 17 00:00:00 2001 From: Matteo Giantomassi Date: Thu, 25 Jul 2024 01:01:43 +0200 Subject: [PATCH] Fix errors (only two errors left) --- .github/workflows/gh-pages.yml | 37 +- .github/workflows/test.yml | 8 +- README.rst | 2 +- abipy/core/restapi.py | 228 ++++++------ abipy/core/structure.py | 59 ++- abipy/core/testing.py | 3 +- .../{travis_manager.yml => gh_manager.yml} | 3 +- ...{travis_scheduler.yml => gh_scheduler.yml} | 0 abipy/dfpt/ddb.py | 25 +- abipy/electrons/ebands.py | 22 +- abipy/ppcodes/oncv_parser.py | 3 +- abipy/ppcodes/ppgen.py | 25 +- abipy/scripts/abistruct.py | 62 ++-- abipy/scripts/oncv.py | 5 +- abipy/tools/notebooks.py | 2 +- dev_scripts/conda_get.sh | 30 -- dev_scripts/conda_install.sh | 17 - docs/api/embedding_api.rst | 2 +- docs/api/flowtk_api.rst | 2 +- docs/api/index.rst | 2 + docs/api/{ml.rst => ml_api.rst} | 2 +- docs/flows_howto.rst | 24 +- docs/links.rst | 5 +- docs/postprocessing_howto.rst | 90 ++--- docs/sg_execution_times.rst | 350 +++++++++--------- docs/workflows/manager_examples.rst | 55 +-- requirements.txt | 4 +- 27 files changed, 507 insertions(+), 560 deletions(-) rename abipy/data/managers/{travis_manager.yml => gh_manager.yml} (86%) rename abipy/data/managers/{travis_scheduler.yml => gh_scheduler.yml} (100%) delete mode 100755 dev_scripts/conda_get.sh delete mode 100755 dev_scripts/conda_install.sh rename docs/api/{ml.rst => ml_api.rst} (96%) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index a159a0842..807258186 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -33,6 +33,11 @@ jobs: python: '3.11' runs-on: ubuntu-latest + env: + PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }} + # This is used in the flow scripts to generate the graph with graphviz. + READTHEDOCS: 1 + steps: - name: Check out Abipy repo uses: actions/checkout@v4 @@ -54,26 +59,28 @@ jobs: mpirun -n 1 abinit --build pip install --editable . mkdir -p $HOME/.abinit/abipy/ - cp abipy/data/managers/travis_manager.yml $HOME/.abinit/abipy/manager.yml - cp abipy/data/managers/simple_scheduler.yml $HOME/.abinit/abipy/scheduler.yml + cp abipy/data/managers/gh_manager.yml $HOME/.abinit/abipy/manager.yml + cp abipy/data/managers/gh_scheduler.yml $HOME/.abinit/abipy/scheduler.yml - name: Build docs with Sphinx run: | conda activate abipy - cd docs + cd docs source install.sh make - #- name: Upload artifact - # uses: actions/upload-pages-artifact@v2 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: site/ # Important. Set to your output dir in MkDocs - #deploy: - # environment: - # name: github-pages - # url: ${{ steps.deployment.outputs.page_url }} - # runs-on: ubuntu-latest - # needs: build - # steps: - # - name: Deploy to GitHub Pages - # id: deployment - # uses: actions/deploy-pages@v2 + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ac4aaaaae..beadecf3a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,12 +25,10 @@ jobs: config: - os: ubuntu-latest python: '3.11' - #python: '>3.9' runs-on: ${{ matrix.config.os }} - - #env: - # PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }} + env: + PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }} steps: - name: Check out Abipy repo @@ -57,7 +55,7 @@ jobs: run: | conda activate abipy pip install -r requirements-tests.txt - pytest -v . + pytest -v . - name: integration_tests run: | diff --git a/README.rst b/README.rst index 2075744cc..8ec929b89 100644 --- a/README.rst +++ b/README.rst @@ -447,7 +447,7 @@ AbiPy is released under the GNU GPL license. For more details see the LICENSE fi .. |download-with-anaconda| image:: https://anaconda.org/abinit/abipy/badges/installer/conda.svg :alt: Download with Anaconda - :target: https://conda.anaconda.org/abinit + :target: https://anaconda.org/conda-forge/abinit .. |launch-binder| image:: https://mybinder.org/badge.svg :alt: Launch binder diff --git a/abipy/core/restapi.py b/abipy/core/restapi.py index f9d2cdea9..f7da87be1 100644 --- a/abipy/core/restapi.py +++ b/abipy/core/restapi.py @@ -17,7 +17,6 @@ from abipy.core.mixins import NotebookWriter -MP_DEFAULT_ENDPOINT = "https://materialsproject.org/rest/v2" MP_KEYS_FOR_DATAFRAME = ( "pretty_formula", "e_above_hull", "energy_per_atom", @@ -27,132 +26,113 @@ ) -def get_mprester(api_key=None, endpoint=None) -> MyMPRester: +def get_mprester(): """ Args: - api_key (str): A String API key for accessing the MaterialsProject - REST interface. Please apply on the Materials Project website for one. - If this is None, the code will check if there is a `PMG_MAPI_KEY` in - your .pmgrc.yaml. If so, it will use that environment - This makes easier for heavy users to simply add - this environment variable to their setups and MPRester can - then be called without any arguments. - endpoint (str): Url of endpoint to access the MaterialsProject REST interface. - Defaults to the standard Materials Project REST address, but - can be changed to other urls implementing a similar interface. """ - if api_key is None: - try: - from pymatgen.core import SETTINGS - except ImportError: - from pymatgen import SETTINGS - - api_key = SETTINGS.get("PMG_MAPI_KEY") - if api_key is None: - raise RuntimeError("Cannot find PMG_MAPI_KEY in pymatgen settings. Add it to $HOME/.pmgrc.yaml") - - if endpoint is None: endpoint = MP_DEFAULT_ENDPOINT - return MyMPRester(api_key=api_key, endpoint=endpoint) - - -class MyMPRester(MPRester): - """ - Subclass Materials project Rester. - See :cite:`Jain2013,Ong2015`. - - .. rubric:: Inheritance Diagram - .. inheritance-diagram:: MyMPRester - """ - Error = MPRestError - - def get_phasediagram_results(self, elements) -> PhaseDiagramResults: - """ - Contact the materials project database, fetch entries and build :class:``PhaseDiagramResults`` instance. - - Args: - elements: List of chemical elements. - """ - entries = self.get_entries_in_chemsys(elements, inc_structure="final") - return PhaseDiagramResults(entries) - - -class PhaseDiagramResults: - """ - Simplified interface to phase-diagram pymatgen API. - - Inspired to: - - https://anaconda.org/matsci/plotting-and-analyzing-a-phase-diagram-using-the-materials-api/notebook - - See also: :cite:`Ong2008,Ong2010` - """ - def __init__(self, entries): - self.entries = entries - # Convert pymatgen structure to Abipy. - from abipy.core.structure import Structure - for e in entries: - e.structure.__class__ = Structure - - self.structures = [e.structure for e in entries] - self.mpids = [e.entry_id for e in entries] - - # Create phase diagram. - from pymatgen.analysis.phase_diagram import PhaseDiagram - self.phasediagram = PhaseDiagram(self.entries) - - def plot(self, show_unstable=True, show=True): - """ - Plot phase diagram. - - Args: - show_unstable (float): Whether unstable phases will be plotted as - well as red crosses. If a number > 0 is entered, all phases with - ehull < show_unstable will be shown. - show: True to show plot. - - Return: plotter object. - """ - from pymatgen.analysis.phase_diagram import PDPlotter - plotter = PDPlotter(self.phasediagram, show_unstable=show_unstable) - if show: - plotter.show() - return plotter - - @lazy_property - def dataframe(self) -> pd.DataFrame: - """Pandas dataframe with the most important results.""" - rows = [] - for e in self.entries: - d = e.structure.get_dict4pandas(with_spglib=True) - decomp, ehull = self.phasediagram.get_decomp_and_e_above_hull(e) - - rows.append(OrderedDict([ - ("Materials ID", e.entry_id), - ("spglib_symb", d["spglib_symb"]), ("spglib_num", d["spglib_num"]), - ("Composition", e.composition.reduced_formula), - ("Ehull", ehull), # ("Equilibrium_reaction_energy", pda.get_equilibrium_reaction_energy(e)), - ("Decomposition", " + ".join(["%.2f %s" % (v, k.composition.formula) for k, v in decomp.items()])), - ])) - - import pandas as pd - return pd.DataFrame(rows, columns=list(rows[0].keys()) if rows else None) - - def print_dataframes(self, with_spglib=False, file=sys.stdout, verbose=0) -> None: - """ - Print pandas dataframe to file `file`. - - Args: - with_spglib: True to compute spacegroup with spglib. - file: Output stream. - verbose: Verbosity level. - """ - print_dataframe(self.dataframe, file=file) - if verbose: - from abipy.core.structure import dataframes_from_structures - dfs = dataframes_from_structures(self.structures, index=self.mpids, with_spglib=with_spglib) - print_dataframe(dfs.lattice, title="Lattice parameters:", file=file) - if verbose > 1: - print_dataframe(dfs.coords, title="Atomic positions (columns give the site index):", file=file) + rester = MPRester() + #print(f"{type(rester)=}") + return rester + + +#class MyMPRester(MPRester): +# """ +# Subclass Materials project Rester. +# See :cite:`Jain2013,Ong2015`. +# +# .. rubric:: Inheritance Diagram +# .. inheritance-diagram:: MyMPRester +# """ +# Error = MPRestError +# +# def get_phasediagram_results(self, elements) -> PhaseDiagramResults: +# """ +# Contact the materials project database, fetch entries and build :class:``PhaseDiagramResults`` instance. +# +# Args: +# elements: List of chemical elements. +# """ +# entries = self.get_entries_in_chemsys(elements, inc_structure="final") +# return PhaseDiagramResults(entries) + + +#class PhaseDiagramResults: +# """ +# Simplified interface to phase-diagram pymatgen API. +# +# Inspired to: +# +# https://anaconda.org/matsci/plotting-and-analyzing-a-phase-diagram-using-the-materials-api/notebook +# +# See also: :cite:`Ong2008,Ong2010` +# """ +# def __init__(self, entries): +# self.entries = entries +# # Convert pymatgen structure to Abipy. +# from abipy.core.structure import Structure +# for e in entries: +# e.structure.__class__ = Structure +# +# self.structures = [e.structure for e in entries] +# self.mpids = [e.entry_id for e in entries] +# +# # Create phase diagram. +# from pymatgen.analysis.phase_diagram import PhaseDiagram +# self.phasediagram = PhaseDiagram(self.entries) +# +# def plot(self, show_unstable=True, show=True): +# """ +# Plot phase diagram. +# +# Args: +# show_unstable (float): Whether unstable phases will be plotted as +# well as red crosses. If a number > 0 is entered, all phases with +# ehull < show_unstable will be shown. +# show: True to show plot. +# +# Return: plotter object. +# """ +# from pymatgen.analysis.phase_diagram import PDPlotter +# plotter = PDPlotter(self.phasediagram, show_unstable=show_unstable) +# if show: +# plotter.show() +# return plotter +# +# @lazy_property +# def dataframe(self) -> pd.DataFrame: +# """Pandas dataframe with the most important results.""" +# rows = [] +# for e in self.entries: +# d = e.structure.get_dict4pandas(with_spglib=True) +# decomp, ehull = self.phasediagram.get_decomp_and_e_above_hull(e) +# +# rows.append(OrderedDict([ +# ("Materials ID", e.entry_id), +# ("spglib_symb", d["spglib_symb"]), ("spglib_num", d["spglib_num"]), +# ("Composition", e.composition.reduced_formula), +# ("Ehull", ehull), # ("Equilibrium_reaction_energy", pda.get_equilibrium_reaction_energy(e)), +# ("Decomposition", " + ".join(["%.2f %s" % (v, k.composition.formula) for k, v in decomp.items()])), +# ])) +# +# import pandas as pd +# return pd.DataFrame(rows, columns=list(rows[0].keys()) if rows else None) +# +# def print_dataframes(self, with_spglib=False, file=sys.stdout, verbose=0) -> None: +# """ +# Print pandas dataframe to file `file`. +# +# Args: +# with_spglib: True to compute spacegroup with spglib. +# file: Output stream. +# verbose: Verbosity level. +# """ +# print_dataframe(self.dataframe, file=file) +# if verbose: +# from abipy.core.structure import dataframes_from_structures +# dfs = dataframes_from_structures(self.structures, index=self.mpids, with_spglib=with_spglib) +# print_dataframe(dfs.lattice, title="Lattice parameters:", file=file) +# if verbose > 1: +# print_dataframe(dfs.coords, title="Atomic positions (columns give the site index):", file=file) class DatabaseStructures(NotebookWriter): diff --git a/abipy/core/structure.py b/abipy/core/structure.py index 594ffda58..42921bfa1 100644 --- a/abipy/core/structure.py +++ b/abipy/core/structure.py @@ -41,14 +41,12 @@ ] -def mp_match_structure(obj, api_key=None, endpoint=None, final=True): +def mp_match_structure(obj): """ Finds matching structures on the Materials Project database. Args: obj: filename or |Structure| object. - api_key (str): A String API key for accessing the MaterialsProject REST interface. - endpoint (str): Url of endpoint to access the MaterialsProject REST interface. final (bool): Whether to get the final structure, or the initial (pre-relaxation) structure. Defaults to True. @@ -62,12 +60,14 @@ def mp_match_structure(obj, api_key=None, endpoint=None, final=True): from abipy.core import restapi structures, mpids = [], [] - with restapi.get_mprester(api_key=api_key, endpoint=endpoint) as rest: + with restapi.get_mprester() as rest: try: + if getattr(rest, "get_data") is None: + raise RuntimeError("mp_match_structure requires mp-api, please install it with `pip install mp-api`") + mpids = rest.find_structure(structure) if mpids: - structures = [Structure.from_mpid(mid, final=final, api_key=api_key, endpoint=endpoint) - for mid in mpids] + structures = [Structure.from_mpid(mid) for mid in mpids] except Exception as exc: cprint(str(exc), "red") @@ -80,7 +80,7 @@ def mp_match_structure(obj, api_key=None, endpoint=None, final=True): return restapi.MpStructures(structures=structures, ids=mpids) -def mp_search(chemsys_formula_id, api_key=None, endpoint=None): +def mp_search(chemsys_formula_id): """ Connect to the materials project database. Get a list of structures corresponding to a chemical system, formula, or materials_id. @@ -88,32 +88,32 @@ def mp_search(chemsys_formula_id, api_key=None, endpoint=None): Args: chemsys_formula_id (str): A chemical system (e.g., Li-Fe-O), or formula (e.g., Fe2O3) or materials_id (e.g., mp-1234). - api_key (str): A String API key for accessing the MaterialsProject REST interface. - If this is None, the code will check if there is a `PMG_MAPI_KEY` in your .pmgrc.yaml. - endpoint (str): Url of endpoint to access the MaterialsProject REST interface. Returns: :class:`MpStructures` object with List of Structure objects, Materials project ids associated to structures. and List of dictionaries with MP data (same order as structures). - Note that the attributes evalute to False if no match is found + Note that the attributes evalute to False if no match is found. """ chemsys_formula_id = chemsys_formula_id.replace(" ", "") structures, mpids, data = [], [], None from abipy.core import restapi - with restapi.get_mprester(api_key=api_key, endpoint=endpoint) as rest: + from pymatgen.ext.matproj import MPRestError + with restapi.get_mprester() as rest: try: + if getattr(rest, "get_data") is None: + raise RuntimeError("mp_search requires mp-api, please install it with `pip install mp-api`") + data = rest.get_data(chemsys_formula_id, prop="") if data: - structures = [Structure.from_str(d["cif"], fmt="cif", primitive=False, sort=False) - for d in data] + structures = [Structure.from_str(d["cif"], fmt="cif", primitive=False, sort=False) for d in data] mpids = [d["material_id"] for d in data] # Want AbiPy structure. structures = list(map(Structure.as_structure, structures)) - except rest.Error as exc: + except MPRestError: cprint(str(exc), "magenta") return restapi.MpStructures(structures, mpids, data=data) @@ -194,10 +194,13 @@ def as_structure(cls, obj: Any) -> Structure: - Objects with a ``structure`` attribute. - ASE atoms. """ - if isinstance(obj, cls): return obj + if isinstance(obj, cls): + return obj + if isinstance(obj, pmg_Structure): obj.__class__ = cls return obj + if hasattr(obj, "ase_objtype"): # ASE Atoms. from pymatgen.io.ase import AseAtomsAdaptor @@ -331,7 +334,7 @@ def from_file(cls, filepath: str, primitive: bool = False, sort: bool = False) - return new @classmethod - def from_mpid(cls, material_id: str, final=True, api_key=None, endpoint=None) -> Structure: + def from_mpid(cls, material_id: str) -> Structure: """ Get a Structure corresponding to a material_id. @@ -339,15 +342,6 @@ def from_mpid(cls, material_id: str, final=True, api_key=None, endpoint=None) -> material_id (str): Materials Project material_id (a string, e.g., mp-1234). final (bool): Whether to get the final structure, or the initial (pre-relaxation) structure. Defaults to True. - api_key (str): A String API key for accessing the MaterialsProject - REST interface. Please apply on the Materials Project website for one. - If this is None, the code will check if there is a ``PMG_MAPI_KEY`` in your .pmgrc.yaml. - If so, it will use that environment - This makes easier for heavy users to simply add this environment variable - to their setups and MPRester can then be called without any arguments. - endpoint (str): Url of endpoint to access the MaterialsProject REST interface. - Defaults to the standard Materials Project REST address, but - can be changed to other urls implementing a similar interface. Returns: |Structure| object. """ @@ -357,9 +351,8 @@ def from_mpid(cls, material_id: str, final=True, api_key=None, endpoint=None) -> # Get pytmatgen structure and convert it to abipy structure from abipy.core import restapi - with restapi.get_mprester(api_key=api_key, endpoint=endpoint) as rest: - new = rest.get_structure_by_material_id(material_id, final=final) - #new = rest.get_structure_by_material_id(material_id) + with restapi.get_mprester() as rest: + new = rest.get_structure_by_material_id(material_id) return cls.as_structure(new) @classmethod @@ -841,8 +834,14 @@ def abi_primitive(self, symprec=1e-3, angle_tolerance=5, no_idealize=0) -> Struc s = self.get_sorted_structure() ase_adaptor = AseAtomsAdaptor() ase_atoms = ase_adaptor.get_atoms(structure=s) - standardized = spglib.standardize_cell(ase_atoms, to_primitive=1, no_idealize=no_idealize, + + #standardized = spglib.standardize_cell(ase_atoms, to_primitive=1, no_idealize=no_idealize, + # symprec=symprec, angle_tolerance=angle_tolerance) + + spglib_cell = (ase_atoms.cell, ase_atoms.get_scaled_positions(), ase_atoms.get_atomic_numbers()) + standardized = spglib.standardize_cell(spglib_cell, to_primitive=1, no_idealize=no_idealize, symprec=symprec, angle_tolerance=angle_tolerance) + standardized_ase_atoms = Atoms(scaled_positions=standardized[1], numbers=standardized[2], cell=standardized[0]) standardized_structure = ase_adaptor.get_structure(standardized_ase_atoms) diff --git a/abipy/core/testing.py b/abipy/core/testing.py index c863a4471..56596fe4b 100644 --- a/abipy/core/testing.py +++ b/abipy/core/testing.py @@ -340,7 +340,8 @@ def skip_if_abinit_not_ge(self, version: str) -> None: @staticmethod def test_mprester(): """Skip MP rester tests.""" - raise unittest.SkipTest("MPRester tests have been disabled") + #raise unittest.SkipTest("MPRester tests have been disabled") + return True @staticmethod def has_matplotlib(version: Optional[str] = None, op: str = ">=") -> bool: diff --git a/abipy/data/managers/travis_manager.yml b/abipy/data/managers/gh_manager.yml similarity index 86% rename from abipy/data/managers/travis_manager.yml rename to abipy/data/managers/gh_manager.yml index 7aa9f1fcf..39e2d9185 100644 --- a/abipy/data/managers/travis_manager.yml +++ b/abipy/data/managers/gh_manager.yml @@ -1,8 +1,9 @@ +# Manager used for github actions. qadapters: - priority: 1 queue: - qname: travis + qname: github qtype: shell job: mpi_runner: mpirun diff --git a/abipy/data/managers/travis_scheduler.yml b/abipy/data/managers/gh_scheduler.yml similarity index 100% rename from abipy/data/managers/travis_scheduler.yml rename to abipy/data/managers/gh_scheduler.yml diff --git a/abipy/dfpt/ddb.py b/abipy/dfpt/ddb.py index ec0e61ce7..8ad3058eb 100644 --- a/abipy/dfpt/ddb.py +++ b/abipy/dfpt/ddb.py @@ -127,7 +127,7 @@ def from_string(cls, string: str) -> DdbFile: return cls(tmp_filepath) @classmethod - def from_mpid(cls, material_id, api_key=None, endpoint=None) -> DdbFile: + def from_mpid(cls, material_id) -> DdbFile: """ Fetch DDB file corresponding to a materials project ``material_id``, save it to temporary file and return new DdbFile object. @@ -136,17 +136,17 @@ def from_mpid(cls, material_id, api_key=None, endpoint=None) -> DdbFile: Args: material_id (str): Materials Project material_id (e.g., mp-1234). - api_key (str): A String API key for accessing the MaterialsProject REST interface. - If None, the code will check if there is a `PMG_MAPI_KEY` in your .pmgrc.yaml. - endpoint (str): Url of endpoint to access the MaterialsProject REST interface. - Defaults to the standard Materials Project REST address """ material_id = str(material_id) if not material_id.startswith("mp-"): raise ValueError("Materials project ID should start with mp-") from abipy.core import restapi - with restapi.get_mprester(api_key=api_key, endpoint=endpoint) as rest: + with restapi.get_mprester() as rest: + + if getattr(rest, "_make_request") is None: + raise RuntimeError("from_mpid requires mp-api, please install it with `pip install mp-api`") + ddb_string = rest._make_request("/materials/%s/abinit_ddb" % material_id) _, tmpfile = tempfile.mkstemp(prefix=material_id, suffix='_DDB') @@ -2926,16 +2926,12 @@ def class_handles_filename(cls, filename: str): return filename.endswith("_" + cls.EXT) @classmethod - def from_mpid_list(cls, mpid_list, api_key=None, endpoint=None): + def from_mpid_list(cls, mpid_list): """ Build a DdbRobot from list of materials-project ids. Args: mpid_list: List of Materials Project material_ids (e.g., ["mp-1234", "mp-1245"]). - api_key (str): A String API key for accessing the MaterialsProject REST interface. - If None, the code will check if there is a `PMG_MAPI_KEY` in your .pmgrc.yaml. - endpoint (str): Url of endpoint to access the MaterialsProject REST interface. - Defaults to the standard Materials Project REST address """ from abipy.core import restapi ddb_files = [] @@ -2943,10 +2939,15 @@ def from_mpid_list(cls, mpid_list, api_key=None, endpoint=None): if not mpid_list: raise RuntimeError("No structure found in the MP database") + if any(not s.startswith("mp-") for s in mpid_list): raise ValueError(f"Invalid mp-in in list:\n{mpid_list}") - with restapi.get_mprester(api_key=api_key, endpoint=endpoint) as rest: + with restapi.get_mprester() as rest: + + if getattr(rest, "_make_request") is None: + raise RuntimeError("from_mpid_list requires mp-api, please install it with `pip install mp-api`") + for mpid in mpid_list: try: ddb_string = rest._make_request("/materials/%s/abinit_ddb" % mpid) diff --git a/abipy/electrons/ebands.py b/abipy/electrons/ebands.py index 753f2f929..d99acf683 100644 --- a/abipy/electrons/ebands.py +++ b/abipy/electrons/ebands.py @@ -458,7 +458,7 @@ def as_ebands(cls, obj: Any) -> ElectronBands: raise TypeError("Don't know how to extract ebands from object `%s`" % type(obj)) @classmethod - def from_mpid(cls, material_id, api_key=None, endpoint=None, + def from_mpid(cls, material_id, nelect=None, has_timerev=True, nspinor=1, nspden=None, line_mode=True) -> ElectronBands: """ @@ -467,16 +467,6 @@ def from_mpid(cls, material_id, api_key=None, endpoint=None, Args: material_id (str): Materials Project material_id (a string, e.g., mp-1234). - api_key (str): A String API key for accessing the MaterialsProject - REST interface. Please apply on the Materials Project website for one. - If this is None, the code will check if there is a `PMG_MAPI_KEY` in - your .pmgrc.yaml. If so, it will use that environment - This makes easier for heavy users to simply add - this environment variable to their setups and MPRester can - then be called without any arguments. - endpoint (str): Url of endpoint to access the MaterialsProject REST interface. - Defaults to the standard Materials Project REST address, but - can be changed to other urls implementing a similar interface. nelect: Number of electrons in the unit cell. If None, this value is automatically computed using the Fermi level (if metal) or the VBM indices reported in the JSON document sent by the MP database. @@ -491,7 +481,11 @@ def from_mpid(cls, material_id, api_key=None, endpoint=None, # Get pytmatgen structure and convert it to an AbiPy structure from abipy.core import restapi - with restapi.get_mprester(api_key=api_key, endpoint=endpoint) as rest: + with restapi.get_mprester() as rest: + + if getattr(rest, "get_structure_by_material_id") is None: + raise RuntimeError("from_mpid requires mp-api, please install it with `pip install mp-api`") + pmgb = rest.get_bandstructure_by_material_id(material_id=material_id, line_mode=line_mode) if pmgb is None: return None @@ -5487,9 +5481,9 @@ def plot_isosurfaces(self, e0="fermie", cmap=None, verbose=0, **kwargs) -> Figur except ImportError: try: from skimage.measure import marching_cubes - except ImportError: + except ImportError as exc: raise ImportError("scikit-image not installed.\n" - "Please install with it with `conda install scikit-image` or `pip install scikit-image`") + "Please install with it with `conda install scikit-image` or `pip install scikit-image`") from exc e0 = self.get_e0(e0) isobands = self.get_isobands(e0) diff --git a/abipy/ppcodes/oncv_parser.py b/abipy/ppcodes/oncv_parser.py index 218a8cc22..cbd92185b 100644 --- a/abipy/ppcodes/oncv_parser.py +++ b/abipy/ppcodes/oncv_parser.py @@ -206,8 +206,7 @@ def _scan(self, verbose: int = 0) -> OncvParser: if self.rc5 is None: raise self.Error(f"Cannot find magic line starting with `{header}` in: {self.filepath}") - # Parse ATOM and Reference configuration - # Example: + # Parse ATOM and Reference configuration. Example: """ # # n l f energy (Ha) diff --git a/abipy/ppcodes/ppgen.py b/abipy/ppcodes/ppgen.py index 70ab44012..44b43b545 100644 --- a/abipy/ppcodes/ppgen.py +++ b/abipy/ppcodes/ppgen.py @@ -310,25 +310,34 @@ class OncvGenerator(_PseudoGenerator): """ @classmethod - def from_file(cls, path: str, calc_type: str, workdir: Optional[str] = None) -> OncvGenerator: + def from_file(cls, path: str, calc_type: str, use_mgga: bool, workdir: Optional[str] = None) -> OncvGenerator: """ Build the object from a file containing the input parameters. """ with open(path, "rt") as fh: input_str = fh.read() - return cls(input_str, calc_type, workdir=workdir) + return cls(input_str, calc_type, use_mgga=use_mgga, workdir=workdir) - def __init__(self, input_str: str, calc_type: str, workdir: Optional[str] = None): + def __init__(self, input_str: str, calc_type: str, use_mgga: bool, workdir: Optional[str] = None): super().__init__(workdir=workdir) self._input_str = input_str self.calc_type = calc_type + self.use_mgga = use_mgga - self._executable = { - "non-relativistic": which("oncvpspnr.x"), - "scalar-relativistic": which("oncvpsp.x"), - "fully-relativistic": which("oncvpspr.x"), - }[calc_type] + if self.use_mgga: + if calc_type != "scalar-relativistic": + raise ValueError("Only scalar-relativistic pseudos are supported in metagga mode!") + self._executable = { + "scalar-relativistic": which("oncvpspm.x"), + }[calc_type] + + else: + self._executable = { + "non-relativistic": which("oncvpspnr.x"), + "scalar-relativistic": which("oncvpsp.x"), + "fully-relativistic": which("oncvpspr.x"), + }[calc_type] if self._executable is None: msg = "Cannot find oncvpsp executable in $PATH. Use `export PATH=dir_with_oncvps_executable:$PATH`" diff --git a/abipy/scripts/abistruct.py b/abipy/scripts/abistruct.py index ca42cb154..d73ea1b09 100755 --- a/abipy/scripts/abistruct.py +++ b/abipy/scripts/abistruct.py @@ -15,14 +15,13 @@ from monty.string import marquee from monty.functools import prof_main from monty.termcolor import cprint -from pymatgen.io.vasp.outputs import Xdatcar -from abipy import abilab from abipy.core.symmetries import AbinitSpaceGroup from abipy.core.kpoints import Ktables, Kpoint, IrredZone from abipy.core.structure import diff_structures from abipy.iotools.visualizer import Visualizer from abipy.iotools.xsf import xsf_write_structure from abipy.abio import factories +from abipy import abilab def save_structure(structure, options) -> None: @@ -131,7 +130,7 @@ def get_epilog() -> str: `Ir-O-*` for wildcard pattern matching. Print info and Abinit input files. Use e.g. `-f POSCAR` to change output format. `-f None` to disable structure output. - abistruct.py mp_pd FILE-or-elements => Generate phase diagram with entries from the Materials Project. + abistruct.py mp_ebands FILE => Fetch electron band structure from MP database. Print gaps. Accept FILE with structure if ebands from structure is wanted or mp id e.g. "mp-149 or list of elements e.g `Li-Fe-O` or chemical formula. @@ -141,6 +140,8 @@ def get_epilog() -> str: Use `-v` to increase verbosity level (can be supplied multiple times e.g -vv). """ + #abistruct.py mp_pd FILE-or-elements => Generate phase diagram with entries from the Materials Project. + def get_parser(with_epilog=False): @@ -440,9 +441,6 @@ def add_format_arg(parser, default, option=True, formats=None): # Options for commands accessing the materials project database. mp_rest_parser = argparse.ArgumentParser(add_help=False) - mp_rest_parser.add_argument("--mapi-key", default=None, - help="Pymatgen PMG_MAPI_KEY. Use value in .pmgrc.yaml if not specified.") - mp_rest_parser.add_argument("--endpoint", help="Pymatgen database.", default="https://www.materialsproject.org/rest/v2") mp_rest_parser.add_argument("-b", "--browser", default=False, action='store_true', help="Open materials-project webpages in browser") @@ -467,15 +465,15 @@ def add_format_arg(parser, default, option=True, formats=None): add_format_arg(p_mpsearch, default="abivars") # Subparser for mp_pd command. - p_mp_pda = subparsers.add_parser('mp_pd', parents=[mp_rest_parser, copts_parser], - help=("Generate phase diagram with entries from the Materials Project. " - "Requires internet connection and PMG_MAPI_KEY")) - p_mp_pda.add_argument("file_or_elements", type=str, default=None, - help="FILE with structure or elements e.g., Li-Fe-O).") - p_mp_pda.add_argument("-u", "--show-unstable", type=int, default=0, - help="""Whether unstable phases will be plotted as -well as red crosses. If a number > 0 is entered, all phases with -ehull < show_unstable will be shown.""") + #p_mp_pda = subparsers.add_parser('mp_pd', parents=[mp_rest_parser, copts_parser], + # help=("Generate phase diagram with entries from the Materials Project. " + # "Requires internet connection and PMG_MAPI_KEY")) + #p_mp_pda.add_argument("file_or_elements", type=str, default=None, + # help="FILE with structure or elements e.g., Li-Fe-O).") + #p_mp_pda.add_argument("-u", "--show-unstable", type=int, default=0, + # help="""Whether unstable phases will be plotted as +#well as red crosses. If a number > 0 is entered, all phases with +#ehull < show_unstable will be shown.""") # Subparser for mp_ebands command. p_mp_ebands = subparsers.add_parser('mp_ebands', parents=[copts_parser, mp_rest_parser], @@ -916,7 +914,7 @@ def show_examples_and_exit(err_msg=None, error_code=1): print(structure.spget_summary(verbose=options.verbose)) print("\n") - print(marquee("Little Group", mark="=")) + print(marquee("Little group", mark="=")) ltk = spgrp.find_little_group(kpoint=options.kpoint) print(ltk.to_string(verbose=options.verbose)) @@ -952,8 +950,7 @@ def show_examples_and_exit(err_msg=None, error_code=1): elif options.command == "mp_id": # Get the Structure corresponding to material_id. - structure = abilab.Structure.from_mpid(options.mpid, final=True, - api_key=options.mapi_key, endpoint=options.endpoint) + structure = abilab.Structure.from_mpid(options.mpid) # Convert to format and print it. print(structure.convert(fmt=options.format)) @@ -990,30 +987,30 @@ def show_examples_and_exit(err_msg=None, error_code=1): if options.browser: mp.open_browser(limit=None if options.verbose == 2 else 10) - elif options.command == "mp_pd": - if os.path.exists(options.file_or_elements): - structure = abilab.Structure.from_file(options.file_or_elements) - elements = structure.symbol_set - else: - elements = options.file_or_elements.split("-") + #elif options.command == "mp_pd": + # if os.path.exists(options.file_or_elements): + # structure = abilab.Structure.from_file(options.file_or_elements) + # elements = structure.symbol_set + # else: + # elements = options.file_or_elements.split("-") - if options.verbose > 1: print("Building phase-diagram for elements:", elements) - with abilab.restapi.get_mprester(api_key=options.mapi_key, endpoint=options.endpoint) as rest: - pdr = rest.get_phasediagram_results(elements) - pdr.print_dataframes(verbose=options.verbose) - pdr.plot(show_unstable=options.show_unstable) + # if options.verbose > 1: print("Building phase-diagram for elements:", elements) + # with abilab.restapi.get_mprester() as rest: + # pdr = rest.get_phasediagram_results(elements) + # pdr.print_dataframes(verbose=options.verbose) + # pdr.plot(show_unstable=options.show_unstable) elif options.command == "mp_ebands": if os.path.exists(options.chemsys_formula_id): mp = abilab.mp_match_structure(options.chemsys_formula_id) for mpid in mp.ids: - ebands = abilab.ElectronBands.from_mpid(mpid, api_key=options.mapi_key, endpoint=options.endpoint) + ebands = abilab.ElectronBands.from_mpid(mpid) print(ebands) else: if options.chemsys_formula_id.startswith("mp-"): # Assume valid mp identifier. mpid = options.chemsys_formula_id - ebands = abilab.ElectronBands.from_mpid(mpid, api_key=options.mapi_key, endpoint=options.endpoint) + ebands = abilab.ElectronBands.from_mpid(mpid) print(ebands) else: mp = abilab.mp_search(options.chemsys_formula_id) @@ -1025,7 +1022,7 @@ def show_examples_and_exit(err_msg=None, error_code=1): if structure is None: cprint("ignoring mpid %s because cannot find structure" % mpid, "red") continue - ebands = abilab.ElectronBands.from_mpid(mpid, api_key=options.mapi_key, endpoint=options.endpoint) + ebands = abilab.ElectronBands.from_mpid(mpid) if ebands is None: cprint("Cannot get ebands for structure:\n%s" % str(structure), "red") else: @@ -1058,6 +1055,7 @@ def show_examples_and_exit(err_msg=None, error_code=1): structures = hist.structures elif "XDATCAR" in filepath: + from pymatgen.io.vasp.outputs import Xdatcar structures = Xdatcar(filepath).structures if not structures: raise RuntimeError("Your Xdatcar contains only one structure. Due to a bug " diff --git a/abipy/scripts/oncv.py b/abipy/scripts/oncv.py index c2dadd6cd..4567ee587 100755 --- a/abipy/scripts/oncv.py +++ b/abipy/scripts/oncv.py @@ -181,7 +181,7 @@ def oncv_run(options): fr="fully-relativistic")[options.rel] # Build Generator and start generation. - psgen = OncvGenerator.from_file(in_path, calc_type, workdir=None) + psgen = OncvGenerator.from_file(in_path, calc_type, options.use_mgga, workdir=None) print(psgen.input_str) print("Using executable:\n\t", psgen.executable) @@ -209,7 +209,7 @@ def oncv_run(options): # Transfer final output file. shutil.copy(psgen.stdout_path, out_path) - # Parse the output file + # Parse the output file. onc_parser = OncvParser(out_path).scan() if not onc_parser.run_completed: cprint("oncvpsp output is not completed. Exiting", "red") @@ -332,6 +332,7 @@ def get_copts_parser(multi=False): p_run = subparsers.add_parser('run', parents=[copts_parser, plot_parser], help=oncv_run.__doc__) p_run.add_argument("--rel", default="from_file", help=("Relativistic treatment: `nor` for non-relativistic, " "`sr` for scalar-relativistic, `fr` for fully-relativistic. Default: `from_file` i.e. detected from file")) + p_run.add_argument("--use-mgga", action='store_true', default=False, help="Produce mega-gga pseudo with oncvpspm.x") # Subparser for print command. p_print = subparsers.add_parser('print', parents=[copts_parser], help=oncv_print.__doc__) diff --git a/abipy/tools/notebooks.py b/abipy/tools/notebooks.py index 3d90ee220..2ab49f3e1 100644 --- a/abipy/tools/notebooks.py +++ b/abipy/tools/notebooks.py @@ -85,7 +85,7 @@ def print_doc(function, **kwargs): # pragma: no cover def ipw_listdir(top=".", recurse=True, widget_type="dropdown"): # pragma: no cover """ Return an ipython widget listing all the files located within the directory ``top`` - that can be inspected with :ref:`abiopen.py`. The user can select the file in the widget + that can be inspected with abiopen.py. The user can select the file in the widget and print info on the corresponding file inside the notebook. Args: diff --git a/dev_scripts/conda_get.sh b/dev_scripts/conda_get.sh deleted file mode 100755 index bed12038e..000000000 --- a/dev_scripts/conda_get.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -set -e # exit on first error, -v print each command - -# Install conda with travis: https://conda.io/docs/travis.html -if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then - curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh; -else - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; -fi - -bash miniconda.sh -b -p ${HOME}/miniconda -export PATH="${HOME}/miniconda/bin:${PATH}" -hash -r - -conda config --set always_yes yes --set changeps1 yes -conda update -q conda -# Useful for debugging any issues with conda -conda info -a -conda config --add channels conda-forge -echo "Installing abinit from abinit channel in abinit-environment..." -conda create -q -n abinit-environment python=${TRAVIS_PYTHON_VERSION} -source activate abinit-environment -#conda install -y -c abinit abinit=${ABINIT_VERSION} -conda install -y -c conda-forge abinit=${ABINIT_VERSION} -abinit --version -abinit --build - -echo "Creating test-environment for python stack..." -conda create -q -n test-environment python=${TRAVIS_PYTHON_VERSION} -source activate test-environment diff --git a/dev_scripts/conda_install.sh b/dev_scripts/conda_install.sh deleted file mode 100755 index 738e5c6db..000000000 --- a/dev_scripts/conda_install.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -set -e # exit on first error - -echo "Installing bader executable (http://theory.cm.utexas.edu/henkelman/code/bader/) from matsci ..." -conda install -y -c matsci bader -#conda install -c abinit apscheduler==2.1.0 -#pip install apscheduler==2.1.0 - -echo "Installing requirements listed requirements.txt and requirements-optional.txt ..." -# https://github.com/ContinuumIO/anaconda-issues/issues/542 -conda install -y -c anaconda setuptools -conda install nomkl -conda install -y --file ./requirements.txt -conda install -y --file ./requirements-optional.txt -conda install -y -c conda-forge graphviz python-graphviz - -echo "Installation completed" diff --git a/docs/api/embedding_api.rst b/docs/api/embedding_api.rst index 5b9294555..52a492167 100644 --- a/docs/api/embedding_api.rst +++ b/docs/api/embedding_api.rst @@ -21,7 +21,7 @@ embedding Package :show-inheritance: :mod:`utils_ifc` Module ----------------------- +----------------------- .. automodule:: abipy.embedding.utils_ifc :members: diff --git a/docs/api/flowtk_api.rst b/docs/api/flowtk_api.rst index ac3ea4a9f..dc95a2642 100644 --- a/docs/api/flowtk_api.rst +++ b/docs/api/flowtk_api.rst @@ -86,7 +86,7 @@ flowtk Package :show-inheritance: :mod:`gw_works` Module ----------------- +---------------------- .. automodule:: abipy.flowtk.gw_works :members: diff --git a/docs/api/index.rst b/docs/api/index.rst index dbec7d979..31af27aa2 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -20,6 +20,8 @@ API documentation flowtk_api.rst iotools_api.rst lumi_api.rst + ml_api.rst + ppcodes_api.rst panels_api.rst tools_api.rst waves_api.rst diff --git a/docs/api/ml.rst b/docs/api/ml_api.rst similarity index 96% rename from docs/api/ml.rst rename to docs/api/ml_api.rst index 850fd86b1..6fbc27248 100644 --- a/docs/api/ml.rst +++ b/docs/api/ml_api.rst @@ -37,7 +37,7 @@ ml Package :mod:`ml_phonopy` Package -------------------------------- +------------------------- .. automodule:: abipy.ml.ml_phonopy :members: diff --git a/docs/flows_howto.rst b/docs/flows_howto.rst index bf45f1a29..23bdcc0eb 100644 --- a/docs/flows_howto.rst +++ b/docs/flows_howto.rst @@ -4,7 +4,7 @@ Flows How-To ************ -This is a list of FAQs about the AbiPy flows and the :ref:`abirun.py` script. +This is a list of FAQs about the AbiPy flows and the abirun.py_ script. Feel free to suggest new entries! .. important:: @@ -16,7 +16,7 @@ Feel free to suggest new entries! Suggestions: * Start with the examples available in examples/flows before embarking on large scale calculations. -* Make sure the Abinit executable compiled on the machine can be executed both on the front end +* Make sure the Abinit executable compiled on the machine can be executed both on the front end and the compute node (ask your sysadmin) * If you are running on clusters in which the architecture of the compute node is completely different from the one available on the front end, use ``shell_runner`` @@ -25,8 +25,8 @@ Suggestions: Do not: * Change manually the input files and the submission scripts -* Submit jobs manually when the scheduler is running -* Use a too small delay for the scheduler +* Submit jobs manually when the scheduler is running +* Use a too small delay for the scheduler .. contents:: @@ -35,7 +35,7 @@ Do not: How to get all the TaskManager options -------------------------------------- -The :ref:`abidoc.py` script provides three commands to get the documentation +The abidoc.py_ script provides three commands to get the documentation for the options supported in ``manager.yml`` and ``scheduler.yml``. Use:: @@ -84,10 +84,10 @@ Add the following options to scheduler.yml # Maximum number of cores that can be used by the scheduler. max_ncores_used: 4 -How to reduce the number of files produced by the Flow +How to reduce the number of files produced by the Flow ------------------------------------------------------ -When running many calculations, +When running many calculations, Use ``prtwf -1`` to tell Abinit to produce the wavefunction file only if SCF cycle didn't converged so that AbiPy can reuse the file to restart the calculation. @@ -102,14 +102,14 @@ How to extend tasks/works with specialized code ----------------------------------------------- Remember that pickle_ does not support classes defined inside scripts (`__main__`). -This means that `abirun.py` will likely raise an exception when trying to +This means that `abirun.py` will likely raise an exception when trying to reconstruct the object from the pickle file: .. code-block:: python - AttributeError: Cannot get attribute 'MyWork' on `_ The script provides other commands to get (experimental) structures from the COD_ database, @@ -326,7 +326,7 @@ Compare my structure with the Materials Project database Let's assume we have performed a structural relaxation and we want to compare our results with the Materials Project data. -One can use the :ref:`abicomp.py` structure to extract the structure from the HIST.nc_ +One can use the abicomp.py_ structure to extract the structure from the HIST.nc_ file and compare the data with the database:: abicomp.py mp_structure ../abipy/data/refs/sic_relax_HIST.nc @@ -370,23 +370,23 @@ to plot the SCF iterations or the steps of the structural relaxations or the DFP (depending on the content of run.abo). Note that one can also use:: - + abiview.py log run.log to print the warnings/comments/errors reported in the Abinit log file ``run.log``. -Export bands to xmgrace format +Export bands to xmgrace format ------------------------------ Both |ElectronBands| and |PhononBands| provide a ``to_xmgrace`` method to produce xmgrace_ files. -To export the data to xmgrace, use :ref:`abiview.py` with the ``--xmgrace`` option. +To export the data to xmgrace, use abiview.py_ with the ``--xmgrace`` option. For electrons, use:: abiview.py ebands out_GSR.nc --xmgrace and:: - abiview.py phbands out_PHBST.nc -xmgrace + abiview.py phbands out_PHBST.nc -xmgrace for phonons. @@ -407,7 +407,7 @@ to visualize the Fermi surface with xcrysden_ .. code-block:: ipython - abifile.ebands.to_bxsf("mgb2.bxsf") + abifile.ebands.to_bxsf("mgb2.bxsf") .. important:: @@ -416,23 +416,23 @@ to visualize the Fermi surface with xcrysden_ Visualize phonon displacements ------------------------------ -AbiPy is interfaced with the phononwebsite_ project +AbiPy is interfaced with the phononwebsite_ project If you have already installed the python package from `github `_ it's possbile to export the ``PHBST.nc`` to JSON and then load the file via the web-interface. -Alternatively, it's possible to automate the entire procedure with the :ref:`abiview.py` script. +Alternatively, it's possible to automate the entire procedure with the abiview.py_ script. Use:: abiview.py phbands out_PHBST.nc -web -to start a local web server and open the HTML page inside the default browser +to start a local web server and open the HTML page inside the default browser (the browser can be changed with the ``--browser`` option). It is also possible to visualize the phonon modes starting directly from a DDB_ file with:: abiview.py ddb -web -In this case, AbiPy will invoke anaddb to produce the ``PHBST.nc`` file on an automatically +In this case, AbiPy will invoke anaddb to produce the ``PHBST.nc`` file on an automatically generated q-path and then start the web server. Visualize the results of a structural relaxation @@ -442,10 +442,10 @@ The quickest way is to use:: abiview hist out_HIST.nc -to plot the results with matplotlib or:: +to plot the results with matplotlib or:: abiopen.py out_HIST.nc -p - + to print the most important results to terminal. Note that it's possible to generate a ``XDATCAR`` file with:: @@ -484,8 +484,8 @@ the AbiPy scripts are quite handy for a quick analysis of the results. Compare multiple files ---------------------- -The :ref:`abicomp.py` script is explicitly designed for this kind of task. -It operates on multiple files (usually files with the same extension) and +The abicomp.py_ script is explicitly designed for this kind of task. +It operates on multiple files (usually files with the same extension) and either produces matplotlib_ plots or creates AbiPy robots providing methods to analyze the results, perform convergence studies and build pandas DataFrames_. @@ -510,10 +510,10 @@ Remember that it is possible to use the shell syntax ``*_GSR.nc`` to select all If you have nested directories, use unix ``find`` to scan the directory tree for files matching a given pattern For example:: - abicomp.py ebands `find . -name *_GSR.nc` + abicomp.py ebands `find . -name *_GSR.nc` finds all ``GSR.nc`` files contained withing the current working directory. -The output of ``find`` is then passed to the :ref:`abicomp.py` script. +The output of ``find`` is then passed to the abicomp.py_ script. .. note:: @@ -523,8 +523,8 @@ The output of ``find`` is then passed to the :ref:`abicomp.py` script. Profile the scripts ------------------- -All AbiPy script can be executed in profile mode by just prepending the ``prof`` keyword -to the command line arguments. +All AbiPy script can be executed in profile mode by just prepending the ``prof`` keyword +to the command line arguments. This option could be useful if the script seems to be slow and you need to understand what's happening. Use:: @@ -537,10 +537,10 @@ or:: if the script requires a ``COMMAND`` argument. -Get the description of a variable +Get the description of a variable --------------------------------- -The :ref:`abidoc.py` script provides a simplified interface to the Abinit documentation. +The abidoc.py_ script provides a simplified interface to the Abinit documentation. Use:: @@ -558,7 +558,7 @@ Avoid transfering files from the cluster to localhost just to use matplotlib ---------------------------------------------------------------------------- Use `SSHFS `_ -to mount the remote file system over SSH. +to mount the remote file system over SSH. Now one can execute the AbiPy scripts in a terminal running on the local machine. to open/visualize the files stored on the cluster. diff --git a/docs/sg_execution_times.rst b/docs/sg_execution_times.rst index 2c4a9df20..fdd6f54d0 100644 --- a/docs/sg_execution_times.rst +++ b/docs/sg_execution_times.rst @@ -6,7 +6,7 @@ Computation times ================= -**01:32.521** total execution time for 109 files **from all galleries**: +**01:25.939** total execution time for 109 files **from all galleries**: .. container:: @@ -33,329 +33,329 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_gallery_plot_qha_vs_qmesh.py` (``../abipy/examples/plot/plot_qha_vs_qmesh.py``) - - 00:10.314 + - 00:10.151 - 0.0 * - :ref:`sphx_glr_gallery_plot_ddb_asr.py` (``../abipy/examples/plot/plot_ddb_asr.py``) - - 00:04.750 + - 00:04.590 - 0.0 * - :ref:`sphx_glr_gallery_plot_phonons_msqd.py` (``../abipy/examples/plot/plot_phonons_msqd.py``) - - 00:04.432 + - 00:03.910 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_mgb2_phonons_nkpt_tsmear.py` (``../abipy/examples/flows/run_mgb2_phonons_nkpt_tsmear.py``) - - 00:03.683 + - 00:03.448 - 0.0 * - :ref:`sphx_glr_gallery_plot_lumi_1D_nv_center.py` (``../abipy/examples/plot/plot_lumi_1D_nv_center.py``) - - 00:03.131 + - 00:02.743 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_gkq.py` (``../abipy/examples/flows/run_gkq.py``) - - 00:02.525 + - 00:02.557 - 0.0 * - :ref:`sphx_glr_gallery_plot_phbands_nkpt_tsmear.py` (``../abipy/examples/plot/plot_phbands_nkpt_tsmear.py``) - - 00:02.431 - - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_eph_pot.py` (``../abipy/examples/flows/run_eph_pot.py``) - - 00:01.970 + - 00:02.362 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_eph_mob.py` (``../abipy/examples/flows/run_eph_mob.py``) - - 00:01.926 - - 0.0 - * - :ref:`sphx_glr_gallery_plot_mdf.py` (``../abipy/examples/plot/plot_mdf.py``) - - 00:01.924 - - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_eph_al.py` (``../abipy/examples/flows/run_eph_al.py``) - - 00:01.857 + - 00:02.255 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_phonons_wkq.py` (``../abipy/examples/flows/run_phonons_wkq.py``) - - 00:01.827 + * - :ref:`sphx_glr_flow_gallery_run_eph_pot.py` (``../abipy/examples/flows/run_eph_pot.py``) + - 00:02.025 - 0.0 * - :ref:`sphx_glr_gallery_plot_efatbands_spin.py` (``../abipy/examples/plot/plot_efatbands_spin.py``) - - 00:01.774 + - 00:01.959 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_phonons.py` (``../abipy/examples/flows/run_phonons.py``) - - 00:01.492 + - 00:01.858 + - 0.0 + * - :ref:`sphx_glr_flow_gallery_run_phonons_wkq.py` (``../abipy/examples/flows/run_phonons_wkq.py``) + - 00:01.842 + - 0.0 + * - :ref:`sphx_glr_gallery_plot_mdf.py` (``../abipy/examples/plot/plot_mdf.py``) + - 00:01.758 - 0.0 * - :ref:`sphx_glr_gallery_plot_a2f.py` (``../abipy/examples/plot/plot_a2f.py``) - - 00:01.457 + - 00:01.366 - 0.0 * - :ref:`sphx_glr_gallery_plot_efatbands.py` (``../abipy/examples/plot/plot_efatbands.py``) - - 00:01.363 + - 00:01.330 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_lumi_Eu_doped_SLA.py` (``../abipy/examples/flows/run_lumi_Eu_doped_SLA.py``) - - 00:01.323 + * - :ref:`sphx_glr_flow_gallery_run_eph_al.py` (``../abipy/examples/flows/run_eph_al.py``) + - 00:01.303 - 0.0 - * - :ref:`sphx_glr_gallery_plot_phbands_grid.py` (``../abipy/examples/plot/plot_phbands_grid.py``) - - 00:01.136 + * - :ref:`sphx_glr_flow_gallery_run_lumi_Eu_doped_SLA.py` (``../abipy/examples/flows/run_lumi_Eu_doped_SLA.py``) + - 00:01.218 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_conducwork.py` (``../abipy/examples/flows/run_conducwork.py``) - - 00:01.104 - - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_phonons_with_quad.py` (``../abipy/examples/flows/run_phonons_with_quad.py``) - - 00:01.007 + - 00:01.067 - 0.0 - * - :ref:`sphx_glr_gallery_plot_ebands.py` (``../abipy/examples/plot/plot_ebands.py``) - - 00:00.990 + * - :ref:`sphx_glr_gallery_plot_phbands_grid.py` (``../abipy/examples/plot/plot_phbands_grid.py``) + - 00:01.059 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_becs_and_epsilon_vs_kpts.py` (``../abipy/examples/flows/run_becs_and_epsilon_vs_kpts.py``) - - 00:00.986 - - 0.0 - * - :ref:`sphx_glr_gallery_plot_wannier90_abiwan.py` (``../abipy/examples/plot/plot_wannier90_abiwan.py``) - - 00:00.980 - - 0.0 - * - :ref:`sphx_glr_gallery_plot_ebands_boxplot.py` (``../abipy/examples/plot/plot_ebands_boxplot.py``) - - 00:00.969 + - 00:00.979 - 0.0 - * - :ref:`sphx_glr_gallery_plot_lumi_1D_Eu_doped.py` (``../abipy/examples/plot/plot_lumi_1D_Eu_doped.py``) - - 00:00.922 - - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_si_ebands.py` (``../abipy/examples/flows/run_si_ebands.py``) - - 00:00.920 + * - :ref:`sphx_glr_flow_gallery_run_phonons_with_quad.py` (``../abipy/examples/flows/run_phonons_with_quad.py``) + - 00:00.966 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_flexoelectric.py` (``../abipy/examples/flows/run_flexoelectric.py``) - - 00:00.908 - - 0.0 - * - :ref:`sphx_glr_gallery_plot_speed_of_sound.py` (``../abipy/examples/plot/plot_speed_of_sound.py``) - - 00:00.831 + - 00:00.869 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_raman_optic.py` (``../abipy/examples/flows/run_raman_optic.py``) - - 00:00.826 + - 00:00.827 + - 0.0 + * - :ref:`sphx_glr_gallery_plot_qpbands_with_interpolation.py` (``../abipy/examples/plot/plot_qpbands_with_interpolation.py``) + - 00:00.814 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_optic.py` (``../abipy/examples/flows/run_optic.py``) - - 00:00.819 + - 00:00.793 - 0.0 - * - :ref:`sphx_glr_gallery_plot_qpbands_with_interpolation.py` (``../abipy/examples/plot/plot_qpbands_with_interpolation.py``) - - 00:00.818 + * - :ref:`sphx_glr_flow_gallery_run_elastic.py` (``../abipy/examples/flows/run_elastic.py``) + - 00:00.773 - 0.0 * - :ref:`sphx_glr_gallery_plot_ebands_spin.py` (``../abipy/examples/plot/plot_ebands_spin.py``) - - 00:00.792 + - 00:00.738 + - 0.0 + * - :ref:`sphx_glr_gallery_plot_speed_of_sound.py` (``../abipy/examples/plot/plot_speed_of_sound.py``) + - 00:00.717 + - 0.0 + * - :ref:`sphx_glr_flow_gallery_run_nonlinear.py` (``../abipy/examples/flows/run_nonlinear.py``) + - 00:00.713 - 0.0 * - :ref:`sphx_glr_gallery_plot_ebands_grid.py` (``../abipy/examples/plot/plot_ebands_grid.py``) - - 00:00.778 + - 00:00.703 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_elastic.py` (``../abipy/examples/flows/run_elastic.py``) - - 00:00.770 + * - :ref:`sphx_glr_gallery_plot_lumi_1D_Eu_doped.py` (``../abipy/examples/plot/plot_lumi_1D_Eu_doped.py``) + - 00:00.689 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_gwconv_ecuteps.py` (``../abipy/examples/flows/run_gwconv_ecuteps.py``) - - 00:00.763 + * - :ref:`sphx_glr_flow_gallery_run_relax_vs_kpts_tsmear.py` (``../abipy/examples/flows/run_relax_vs_kpts_tsmear.py``) + - 00:00.676 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_nonlinear.py` (``../abipy/examples/flows/run_nonlinear.py``) - - 00:00.726 + * - :ref:`sphx_glr_flow_gallery_run_gwconv_ecuteps.py` (``../abipy/examples/flows/run_gwconv_ecuteps.py``) + - 00:00.665 - 0.0 * - :ref:`sphx_glr_gallery_plot_qha.py` (``../abipy/examples/plot/plot_qha.py``) - - 00:00.716 + - 00:00.663 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_relax_vs_kpts_tsmear.py` (``../abipy/examples/flows/run_relax_vs_kpts_tsmear.py``) - - 00:00.692 + * - :ref:`sphx_glr_flow_gallery_run_screening.py` (``../abipy/examples/flows/run_screening.py``) + - 00:00.649 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_lumi_NV_center.py` (``../abipy/examples/flows/run_lumi_NV_center.py``) - - 00:00.680 + - 00:00.640 - 0.0 * - :ref:`sphx_glr_gallery_plot_phonons_infrared.py` (``../abipy/examples/plot/plot_phonons_infrared.py``) - - 00:00.675 + - 00:00.621 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_frohlich_zpr.py` (``../abipy/examples/flows/run_frohlich_zpr.py``) - - 00:00.661 + * - :ref:`sphx_glr_flow_gallery_run_raman_bse.py` (``../abipy/examples/flows/run_raman_bse.py``) + - 00:00.616 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_effmass_dfpt.py` (``../abipy/examples/flows/run_effmass_dfpt.py``) - - 00:00.656 + * - :ref:`sphx_glr_flow_gallery_run_phfrozen_ebands.py` (``../abipy/examples/flows/run_phfrozen_ebands.py``) + - 00:00.606 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_screening.py` (``../abipy/examples/flows/run_screening.py``) - - 00:00.648 + * - :ref:`sphx_glr_flow_gallery_run_frohlich_zpr.py` (``../abipy/examples/flows/run_frohlich_zpr.py``) + - 00:00.594 - 0.0 - * - :ref:`sphx_glr_gallery_plot_qpbands_with_scissor.py` (``../abipy/examples/plot/plot_qpbands_with_scissor.py``) - - 00:00.620 + * - :ref:`sphx_glr_flow_gallery_run_si_g0w0.py` (``../abipy/examples/flows/run_si_g0w0.py``) + - 00:00.591 - 0.0 - * - :ref:`sphx_glr_gallery_plot_gruneisen.py` (``../abipy/examples/plot/plot_gruneisen.py``) - - 00:00.618 + * - :ref:`sphx_glr_gallery_plot_qpbands_with_scissor.py` (``../abipy/examples/plot/plot_qpbands_with_scissor.py``) + - 00:00.589 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_raman_bse.py` (``../abipy/examples/flows/run_raman_bse.py``) - - 00:00.615 + * - :ref:`sphx_glr_gallery_plot_ifcs.py` (``../abipy/examples/plot/plot_ifcs.py``) + - 00:00.582 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_phfrozen_ebands.py` (``../abipy/examples/flows/run_phfrozen_ebands.py``) - - 00:00.606 + * - :ref:`sphx_glr_flow_gallery_run_effmass_dfpt.py` (``../abipy/examples/flows/run_effmass_dfpt.py``) + - 00:00.576 - 0.0 - * - :ref:`sphx_glr_gallery_plot_efatbands_lm.py` (``../abipy/examples/plot/plot_efatbands_lm.py``) - - 00:00.569 + * - :ref:`sphx_glr_gallery_plot_gruneisen.py` (``../abipy/examples/plot/plot_gruneisen.py``) + - 00:00.572 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_eos.py` (``../abipy/examples/flows/run_eos.py``) - - 00:00.566 + - 00:00.545 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_ldaus.py` (``../abipy/examples/flows/run_ldaus.py``) - - 00:00.553 - - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_si_g0w0.py` (``../abipy/examples/flows/run_si_g0w0.py``) - - 00:00.551 + * - :ref:`sphx_glr_gallery_plot_efatbands_lm.py` (``../abipy/examples/plot/plot_efatbands_lm.py``) + - 00:00.531 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_fe_ebands.py` (``../abipy/examples/flows/run_fe_ebands.py``) - - 00:00.515 + * - :ref:`sphx_glr_flow_gallery_run_ldaus.py` (``../abipy/examples/flows/run_ldaus.py``) + - 00:00.520 - 0.0 * - :ref:`sphx_glr_gallery_plot_qps.py` (``../abipy/examples/plot/plot_qps.py``) - - 00:00.514 - - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_mgb2_edoses.py` (``../abipy/examples/flows/run_mgb2_edoses.py``) - - 00:00.509 + - 00:00.496 - 0.0 - * - :ref:`sphx_glr_gallery_plot_ebands_edos.py` (``../abipy/examples/plot/plot_ebands_edos.py``) - - 00:00.504 + * - :ref:`sphx_glr_flow_gallery_run_relax_vs_kpts.py` (``../abipy/examples/flows/run_relax_vs_kpts.py``) + - 00:00.487 - 0.0 - * - :ref:`sphx_glr_gallery_plot_phonon_fatbands.py` (``../abipy/examples/plot/plot_phonon_fatbands.py``) - - 00:00.498 + * - :ref:`sphx_glr_flow_gallery_run_fe_ebands.py` (``../abipy/examples/flows/run_fe_ebands.py``) + - 00:00.485 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_frohlich_zpr_from_ddb.py` (``../abipy/examples/flows/run_frohlich_zpr_from_ddb.py``) - - 00:00.488 + - 00:00.482 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_gs_vs_kpts.py` (``../abipy/examples/flows/run_gs_vs_kpts.py``) - - 00:00.486 - - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_effmass_finitediff.py` (``../abipy/examples/flows/run_effmass_finitediff.py``) + * - :ref:`sphx_glr_gallery_plot_phonon_fatbands.py` (``../abipy/examples/plot/plot_phonon_fatbands.py``) - 00:00.481 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_ht_si_g0w0ppm.py` (``../abipy/examples/flows/run_ht_si_g0w0ppm.py``) + * - :ref:`sphx_glr_flow_gallery_run_mgb2_edoses.py` (``../abipy/examples/flows/run_mgb2_edoses.py``) - 00:00.481 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_gwr_g0w0.py` (``../abipy/examples/flows/run_gwr_g0w0.py``) - - 00:00.478 + * - :ref:`sphx_glr_flow_gallery_run_gs_vs_kpts.py` (``../abipy/examples/flows/run_gs_vs_kpts.py``) + - 00:00.466 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_ht_si_ebands.py` (``../abipy/examples/flows/run_ht_si_ebands.py``) - - 00:00.472 + * - :ref:`sphx_glr_flow_gallery_run_ht_si_g0w0ppm.py` (``../abipy/examples/flows/run_ht_si_g0w0ppm.py``) + - 00:00.466 - 0.0 - * - :ref:`sphx_glr_gallery_plot_qpconvergence.py` (``../abipy/examples/plot/plot_qpconvergence.py``) + * - :ref:`sphx_glr_flow_gallery_run_effmass_finitediff.py` (``../abipy/examples/flows/run_effmass_finitediff.py``) - 00:00.464 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_gaas_ebands_soc.py` (``../abipy/examples/flows/run_gaas_ebands_soc.py``) - - 00:00.462 + * - :ref:`sphx_glr_flow_gallery_run_ht_si_ebands.py` (``../abipy/examples/flows/run_ht_si_ebands.py``) + - 00:00.454 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_relax_and_ebands.py` (``../abipy/examples/flows/run_relax_and_ebands.py``) - - 00:00.460 - - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_relax_vs_kpts.py` (``../abipy/examples/flows/run_relax_vs_kpts.py``) - - 00:00.453 + - 00:00.452 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_ht_si_bsemdf.py` (``../abipy/examples/flows/run_ht_si_bsemdf.py``) - - 00:00.451 - - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_relax.py` (``../abipy/examples/flows/run_relax.py``) - 00:00.432 - 0.0 - * - :ref:`sphx_glr_flow_gallery_run_phonopy_si.py` (``../abipy/examples/flows/run_phonopy_si.py``) - - 00:00.428 + * - :ref:`sphx_glr_flow_gallery_run_si_ebands.py` (``../abipy/examples/flows/run_si_ebands.py``) + - 00:00.427 - 0.0 - * - :ref:`sphx_glr_gallery_plot_ifcs.py` (``../abipy/examples/plot/plot_ifcs.py``) + * - :ref:`sphx_glr_flow_gallery_run_gwr_g0w0.py` (``../abipy/examples/flows/run_gwr_g0w0.py``) + - 00:00.421 + - 0.0 + * - :ref:`sphx_glr_flow_gallery_run_relax.py` (``../abipy/examples/flows/run_relax.py``) - 00:00.417 - 0.0 + * - :ref:`sphx_glr_flow_gallery_run_gaas_ebands_soc.py` (``../abipy/examples/flows/run_gaas_ebands_soc.py``) + - 00:00.415 + - 0.0 + * - :ref:`sphx_glr_gallery_plot_qpconvergence.py` (``../abipy/examples/plot/plot_qpconvergence.py``) + - 00:00.413 + - 0.0 + * - :ref:`sphx_glr_flow_gallery_run_phonopy_si.py` (``../abipy/examples/flows/run_phonopy_si.py``) + - 00:00.412 + - 0.0 * - :ref:`sphx_glr_flow_gallery_run_from_files.py` (``../abipy/examples/flows/run_from_files.py``) - - 00:00.399 + - 00:00.383 + - 0.0 + * - :ref:`sphx_glr_gallery_plot_optic.py` (``../abipy/examples/plot/plot_optic.py``) + - 00:00.382 - 0.0 * - :ref:`sphx_glr_gallery_plot_kpath_from_ibz.py` (``../abipy/examples/plot/plot_kpath_from_ibz.py``) - - 00:00.395 + - 00:00.372 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_sic_relax.py` (``../abipy/examples/flows/run_sic_relax.py``) - - 00:00.386 + - 00:00.371 - 0.0 - * - :ref:`sphx_glr_gallery_plot_phonons.py` (``../abipy/examples/plot/plot_phonons.py``) - - 00:00.381 + * - :ref:`sphx_glr_gallery_plot_ebands.py` (``../abipy/examples/plot/plot_ebands.py``) + - 00:00.364 - 0.0 * - :ref:`sphx_glr_gallery_plot_edos_vs_broad.py` (``../abipy/examples/plot/plot_edos_vs_broad.py``) - - 00:00.358 + - 00:00.336 - 0.0 * - :ref:`sphx_glr_gallery_plot_phbands_and_dos.py` (``../abipy/examples/plot/plot_phbands_and_dos.py``) - - 00:00.352 + - 00:00.333 - 0.0 - * - :ref:`sphx_glr_gallery_plot_multiple_mdf.py` (``../abipy/examples/plot/plot_multiple_mdf.py``) - - 00:00.350 + * - :ref:`sphx_glr_gallery_plot_scqpgw.py` (``../abipy/examples/plot/plot_scqpgw.py``) + - 00:00.330 - 0.0 - * - :ref:`sphx_glr_gallery_plot_optic.py` (``../abipy/examples/plot/plot_optic.py``) - - 00:00.349 + * - :ref:`sphx_glr_gallery_plot_multiple_mdf.py` (``../abipy/examples/plot/plot_multiple_mdf.py``) + - 00:00.322 - 0.0 - * - :ref:`sphx_glr_gallery_plot_scqpgw.py` (``../abipy/examples/plot/plot_scqpgw.py``) - - 00:00.348 + * - :ref:`sphx_glr_gallery_plot_wannier90_abiwan.py` (``../abipy/examples/plot/plot_wannier90_abiwan.py``) + - 00:00.312 - 0.0 * - :ref:`sphx_glr_gallery_plot_convergence.py` (``../abipy/examples/plot/plot_convergence.py``) - - 00:00.314 + - 00:00.293 - 0.0 * - :ref:`sphx_glr_gallery_plot_ejdos.py` (``../abipy/examples/plot/plot_ejdos.py``) - - 00:00.309 + - 00:00.283 - 0.0 - * - :ref:`sphx_glr_gallery_plot_scr_matrix.py` (``../abipy/examples/plot/plot_scr_matrix.py``) - - 00:00.301 + * - :ref:`sphx_glr_gallery_plot_multiple_hist.py` (``../abipy/examples/plot/plot_multiple_hist.py``) + - 00:00.272 - 0.0 * - :ref:`sphx_glr_gallery_plot_den.py` (``../abipy/examples/plot/plot_den.py``) - - 00:00.300 + - 00:00.267 - 0.0 - * - :ref:`sphx_glr_gallery_plot_multiple_hist.py` (``../abipy/examples/plot/plot_multiple_hist.py``) - - 00:00.290 + * - :ref:`sphx_glr_gallery_plot_scr_matrix.py` (``../abipy/examples/plot/plot_scr_matrix.py``) + - 00:00.263 - 0.0 * - :ref:`sphx_glr_gallery_plot_dfpt_cycle.py` (``../abipy/examples/plot/plot_dfpt_cycle.py``) - - 00:00.270 + - 00:00.258 + - 0.0 + * - :ref:`sphx_glr_gallery_plot_ebands_edos.py` (``../abipy/examples/plot/plot_ebands_edos.py``) + - 00:00.254 + - 0.0 + * - :ref:`sphx_glr_gallery_plot_phonons.py` (``../abipy/examples/plot/plot_phonons.py``) + - 00:00.249 - 0.0 * - :ref:`sphx_glr_gallery_plot_wfk.py` (``../abipy/examples/plot/plot_wfk.py``) - - 00:00.262 + - 00:00.243 + - 0.0 + * - :ref:`sphx_glr_gallery_plot_ebands_boxplot.py` (``../abipy/examples/plot/plot_ebands_boxplot.py``) + - 00:00.240 - 0.0 * - :ref:`sphx_glr_gallery_plot_lobster_files.py` (``../abipy/examples/plot/plot_lobster_files.py``) - - 00:00.259 + - 00:00.220 - 0.0 * - :ref:`sphx_glr_gallery_plot_phonons_lo_to.py` (``../abipy/examples/plot/plot_phonons_lo_to.py``) - - 00:00.240 - - 0.0 - * - :ref:`sphx_glr_gallery_plot_potentials.py` (``../abipy/examples/plot/plot_potentials.py``) - - 00:00.227 + - 00:00.213 - 0.0 * - :ref:`sphx_glr_gallery_plot_lobster_cohp.py` (``../abipy/examples/plot/plot_lobster_cohp.py``) - - 00:00.225 + - 00:00.210 - 0.0 * - :ref:`sphx_glr_gallery_plot_hist.py` (``../abipy/examples/plot/plot_hist.py``) - - 00:00.224 + - 00:00.207 - 0.0 * - :ref:`sphx_glr_gallery_plot_ebands_scatter3d.py` (``../abipy/examples/plot/plot_ebands_scatter3d.py``) - - 00:00.210 - - 0.0 - * - :ref:`sphx_glr_gallery_plot_phonon_pjdos.py` (``../abipy/examples/plot/plot_phonon_pjdos.py``) - - 00:00.191 + - 00:00.201 - 0.0 - * - :ref:`sphx_glr_gallery_plot_gw_spectral_functions.py` (``../abipy/examples/plot/plot_gw_spectral_functions.py``) - - 00:00.179 + * - :ref:`sphx_glr_gallery_plot_potentials.py` (``../abipy/examples/plot/plot_potentials.py``) + - 00:00.186 - 0.0 - * - :ref:`sphx_glr_gallery_plot_bz.py` (``../abipy/examples/plot/plot_bz.py``) - - 00:00.179 + * - :ref:`sphx_glr_gallery_plot_phonon_pjdos.py` (``../abipy/examples/plot/plot_phonon_pjdos.py``) + - 00:00.183 - 0.0 * - :ref:`sphx_glr_gallery_plotly_phbands_and_dos.py` (``../abipy/examples/plot/plotly_phbands_and_dos.py``) - - 00:00.175 + - 00:00.164 - 0.0 - * - :ref:`sphx_glr_gallery_plot_scr.py` (``../abipy/examples/plot/plot_scr.py``) + * - :ref:`sphx_glr_gallery_plot_gw_spectral_functions.py` (``../abipy/examples/plot/plot_gw_spectral_functions.py``) - 00:00.158 - 0.0 + * - :ref:`sphx_glr_gallery_plot_scr.py` (``../abipy/examples/plot/plot_scr.py``) + - 00:00.138 + - 0.0 * - :ref:`sphx_glr_gallery_plot_effmass.py` (``../abipy/examples/plot/plot_effmass.py``) - - 00:00.153 + - 00:00.137 - 0.0 * - :ref:`sphx_glr_gallery_plot_wannier90_wout.py` (``../abipy/examples/plot/plot_wannier90_wout.py``) - - 00:00.149 + - 00:00.136 - 0.0 * - :ref:`sphx_glr_gallery_plot_fold2bloch.py` (``../abipy/examples/plot/plot_fold2bloch.py``) - - 00:00.145 - - 0.0 - * - :ref:`sphx_glr_gallery_plot_edos_grid.py` (``../abipy/examples/plot/plot_edos_grid.py``) - 00:00.130 - 0.0 * - :ref:`sphx_glr_gallery_plot_lruj.py` (``../abipy/examples/plot/plot_lruj.py``) - - 00:00.121 + - 00:00.109 - 0.0 - * - :ref:`sphx_glr_gallery_plot_edos.py` (``../abipy/examples/plot/plot_edos.py``) - - 00:00.115 + * - :ref:`sphx_glr_gallery_plot_bz.py` (``../abipy/examples/plot/plot_bz.py``) + - 00:00.103 - 0.0 * - :ref:`sphx_glr_gallery_plot_gscycle.py` (``../abipy/examples/plot/plot_gscycle.py``) - - 00:00.111 + - 00:00.095 + - 0.0 + * - :ref:`sphx_glr_gallery_plot_edos.py` (``../abipy/examples/plot/plot_edos.py``) + - 00:00.092 - 0.0 * - :ref:`sphx_glr_gallery_plot_phthermo.py` (``../abipy/examples/plot/plot_phthermo.py``) - - 00:00.097 + - 00:00.090 + - 0.0 + * - :ref:`sphx_glr_gallery_plot_edos_grid.py` (``../abipy/examples/plot/plot_edos_grid.py``) + - 00:00.075 - 0.0 * - :ref:`sphx_glr_gallery_plot_phdos_grid.py` (``../abipy/examples/plot/plot_phdos_grid.py``) - - 00:00.078 + - 00:00.074 - 0.0 * - :ref:`sphx_glr_gallery_plot_xrd.py` (``../abipy/examples/plot/plot_xrd.py``) - - 00:00.071 + - 00:00.046 - 0.0 * - :ref:`sphx_glr_gallery_plot_funcs.py` (``../abipy/examples/plot/plot_funcs.py``) - - 00:00.046 + - 00:00.042 - 0.0 * - :ref:`sphx_glr_flow_gallery_run_gruneisen_abinit.py` (``../abipy/examples/flows/run_gruneisen_abinit.py``) - - 00:00.036 + - 00:00.035 - 0.0 diff --git a/docs/workflows/manager_examples.rst b/docs/workflows/manager_examples.rst index 3a7a5167e..04907cf48 100644 --- a/docs/workflows/manager_examples.rst +++ b/docs/workflows/manager_examples.rst @@ -45,6 +45,34 @@ Dragon1 job: *job +Gh +-- + +.. code-block:: yaml + + + # Manager used for github actions. + qadapters: + - + priority: 1 + queue: + qname: github + qtype: shell + job: + mpi_runner: mpirun + pre_run: + - conda activate abipy + limits: + min_cores: 1 + max_cores: 2 + timelimit: 0:10:0 + hardware: + num_nodes: 1 + sockets_per_node: 1 + cores_per_socket: 2 + mem_per_node: 4 GB + + Gmac ---- @@ -582,33 +610,6 @@ Shell_nompi mem_per_node: 4 GB -Travis ------- - -.. code-block:: yaml - - - qadapters: - - - priority: 1 - queue: - qname: travis - qtype: shell - job: - mpi_runner: mpirun - pre_run: - - conda activate abipy - limits: - min_cores: 1 - max_cores: 2 - timelimit: 0:10:0 - hardware: - num_nodes: 1 - sockets_per_node: 1 - cores_per_socket: 2 - mem_per_node: 4 GB - - Ubu --- diff --git a/requirements.txt b/requirements.txt index e98159fca..722e85967 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,11 +7,11 @@ tqdm pyyaml>=3.11 ruamel.yaml>=0.16.12 pandas +#numpy numpy<2.0.0 -scipy sympy spglib -pymatgen==2023.7.17 +pymatgen netCDF4 matplotlib seaborn