abipy package
abipy is a set of tools for the analysis of ABINIT results.
Subpackages
- abipy.abio package
- abipy.core package
- abipy.dfpt package
- abipy.display package
- abipy.dynamics package
- abipy.electrons package
- abipy.embedding namespace
- abipy.eph package
- abipy.flowtk package
- abipy.iotools package
- abipy.lumi package
- abipy.ml package
- abipy.panels package
- abipy.ppcodes package
- abipy.scripts package
- abipy.tools package
- abipy.wannier90 package
- abipy.waves package
Submodules
abipy.abilab module
This module gathers the most important classes and helper functions used for scripting.
- abipy.abilab.abiopen_ext2class_table()[source]
Print the association table between file extensions and File classes.
- abipy.abilab.extcls_supporting_panel(as_table=True, **tabulate_kwargs)[source]
Return list of (ext, cls) tuples where ext is the file extension supporting the get_panel method i.e files that can be integrated with the panel dashboard and cls the python class associated to it.
- abipy.abilab.abipanel(**kwargs)[source]
Activate panel extensions used by AbiPy. Return panel module.
- abipy.abilab.abifile_subclass_from_filename(filename)[source]
Returns the appropriate class associated to the given filename.
- Return type:
- abipy.abilab.dir2abifiles(top, recurse=True)[source]
Analyze the filesystem starting from directory top and return an ordered dictionary mapping the directory name to the list of files supported by
abiopencontained within that directory. If notrecurse, children directories are not analyzed.- Return type:
- abipy.abilab.isabifile(filepath)[source]
Return True if filepath can be opened with
abiopen.- Return type:
- abipy.abilab.abiopen(filepath)[source]
Factory function that opens any file supported by abipy. File type is detected from the extension
- Parameters:
filepath (
str) – string with the filename.
- abipy.abilab.abirobot(filepaths)[source]
Factory function to create and return a Robot subclass from a list of filenames The Robot subclass is detected from the extension of the first file hence all files are assumed to have the same extension.
- abipy.abilab.software_stack(as_dataframe=False)[source]
Import all the hard dependencies and some optional packages. Returns ordered dict: package –> string with version info or pandas dataframe if as_dataframe.
- abipy.abilab.abicheck(verbose=0)[source]
This function tests if the most important ABINIT executables can be found in $PATH and whether the python modules needed at run-time can be imported. Return string with error messages, empty if success.
- Return type:
- abipy.abilab.check_netcdf4_for_shell_submission(manager=None)[source]
Check whether the netCDF4/h5py packages importable in this Python process are safe to use together with a “shell” TaskManager qadapter.
Background
AbiPy’s
ShellAdapter(used when manager.yml declaresqtype: shell) launches the Abinit job as a direct child process of the running Python interpreter, viaPopen(("/bin/bash", script_file), ...). Other adapters (slurm, pbs, sge, …) instead submit through a small helper command (sbatch, qsub, …) whose process tree is unrelated to the compute job, so they are not affected by this issue.If netCDF4 (or h5py) was built against a parallel (MPI-enabled) HDF5/NetCDF stack, merely
import netCDF4loads the MPI runtime (libmpi/libopen-rte/…) into this process – even if the calling script never uses MPI directly (this happens transitively: abipy.iotools eagerly imports pymatgen’s netcdf reader, which eagerly imports netCDF4, so it is triggered by plainimport abipy.flowtk). When AbiPy later forksmpirunout of this same process via ShellAdapter, the freshly-launchedmpiruncan fail immediately and silently: zero-byte log/err files, task status QCritical, no diagnostic anywhere, because it inherits/detects stale MPI runtime state from its live ancestor.- type manager:
- param manager:
Optional TaskManager (or object exposing
.qadapter.QTYPE). When given, the returned message is tailored to whether the active qadapter is actually “shell” (the only one at risk).- returns:
is_safe is False only if netCDF4 and/or h5py report they were built with MPI (parallel I/O) support. message explains the finding and, if unsafe, how to fix it.
- rtype:
- abipy.abilab.install_config_files(workdir=None, force_reinstall=False)[source]
Install pre-defined configuration files for the TaskManager and the Scheduler in the workdir directory.
- abipy.abilab.abipy_logo1()[source]
http://www.text-image.com/convert/pic2ascii.cgi
- Return type:
- abipy.abilab.abipy_logo2()[source]
http://www.text-image.com/convert/pic2ascii.cgi
- Return type:
- abipy.abilab.abipy_logo3()[source]
http://www.text-image.com/convert/pic2ascii.cgi
- Return type: