abipy.scripts package
Empty file, needed by sphinxarg.ext so that scripts can be imported.
Submodules
abipy.scripts.abicheck module
This script checks that the options in manager.yml
, scheduler.yml
,
and the environment on the local machine are properly configured.
- abipy.scripts.abicheck.show_managers(options)[source]
Print table with manager files provided by AbiPy.
abipy.scripts.abicomp module
Script to analyze/compare results stored in multiple netcdf/output files. By default the script displays the results/plots in the shell. Use –ipython to start an ipython terminal or -nb to generate an ipython notebook.
- abipy.scripts.abicomp.remove_disordered(structures, paths)[source]
Remove disordered structures and print warning message.
- abipy.scripts.abicomp.df_to_clipboard(options, df)[source]
Copy dataframe to clipboard if options.clipboard.
- abipy.scripts.abicomp.abicomp_structure(options)[source]
Compare crystalline structures. Use –group to compare for similarity.
- abipy.scripts.abicomp.compare_structures(options)[source]
Inspired to a similar function in pmg_structure.
- abipy.scripts.abicomp.abicomp_spg(options)[source]
Compare the space group found by Abinit with the spglib results for a set of crystalline structure(s) read from FILE(s).
- abipy.scripts.abicomp.abicomp_mp_structure(options)[source]
Compare the crystalline structure(s) read from FILE with the one(s) reported in the materials project database.
- abipy.scripts.abicomp.abicomp_cod_structure(options)[source]
Compare the crystalline structure(s) read from FILE with the one(s) given in the COD database (http://www.crystallography.net/cod).
- abipy.scripts.abicomp.abicomp_xrd(options)[source]
Compare X-ray diffraction plots (requires FILES with structure).
- abipy.scripts.abicomp.abicomp_data(options)[source]
Compare results stored in multiple files with data in tabular format.
- abipy.scripts.abicomp.abicomp_png(options)[source]
Use matplotlib to plot multiple png files on a grid.
- abipy.scripts.abicomp.abicomp_getattr(options)[source]
Extract attribute from Abipy object for all files listed on the command line and print them. Use –list option to list the attributes available (in the first file).
- abipy.scripts.abicomp.abicomp_ddb(options)[source]
Compare multiple DDB files. Assume DDB files with a list of q-points in the IBZ corresponding to homogeneous sampling i.e. files that have been merged with mrgddb.
- abipy.scripts.abicomp.abicomp_mdf(options)[source]
Compare macroscopic dielectric functions stored in multiple MDF files.
- abipy.scripts.abicomp.abicomp_gkq(options)[source]
Compare multiple GKQ files with EPH matrix elements for a given q-point.
- abipy.scripts.abicomp.abicomp_v1qavg(options)[source]
Compare multiple V1QAVG files with the average of the DFPT V1 potentials as function of q-point.
- abipy.scripts.abicomp.abicomp_sigeph(options)[source]
Compare multiple SIGEPH files storing the e-ph self-energy.
- abipy.scripts.abicomp.abicomp_abiwan_ebands(options)[source]
Compare Wannier-interpolated band structure with ab-initio data.
- abipy.scripts.abicomp.abicomp_skw_ibz_kpath(options)[source]
Compare star-function-interpolated band structure with ab-initio band structure computed along a k-path.
- abipy.scripts.abicomp.abicomp_pseudos(options)[source]
“Compare multiple pseudos and print table to terminal.
abipy.scripts.abidoc module
Interface to the database of ABINIT input variables
abipy.scripts.abigui module
Script to start the panel-based AbiPy web GUI.
abipy.scripts.abiml module
Script to perform several types of calculations with ASE and ML potentials.
- abipy.scripts.abiml.set_default(ctx, param, filepath)[source]
To have config file for a single command: Based on https://stackoverflow.com/questions/46358797/python-click-supply-arguments-and-options-from-a-configuration-file
- abipy.scripts.abiml.add_phonopy_opts(f, supercell=(2, 2, 2))[source]
Add CLI options for phonopy_calculations.
abipy.scripts.abinp module
This script provides a simplified interface to the AbiPy factory functions. For a more flexible interface, please use the AbiPy objects to generate input files and workflows.
- abipy.scripts.abinp.vasp_dict_set_cls(s)[source]
Return a subclass of DictSect from string s. If s == “__all__”, return list with all VaspInputSet subclasses supported by pymatgen.
- abipy.scripts.abinp.build_abinit_input_from_file(options, **abivars)[source]
Build and return an AbinitInput instance from filepath.
abivars are optional variables that will be added to the input.
- abipy.scripts.abinp.abinp_abispg(options)[source]
Call Abinit with chkprim = 0 to find space group.
- abipy.scripts.abinp.abinp_ebands(options)[source]
Build Abinit input for band structure calculations.
- abipy.scripts.abinp.abinp_anaph(options)[source]
Build Anaddb input file for the computation of phonon bands DOS.
- abipy.scripts.abinp.abinp_vasp(options)[source]
Build VASP input files from a FILE defining the structure.
- abipy.scripts.abinp.abinp_wannier90(options)[source]
Build wannier90 template input file from Abinit input/output file. possibly with electron bands.
abipy.scripts.abiopen module
This script opens one of the output files produced by Abinit (usually in netcdf format but other files are supported as well). By default the script starts an interactive ipython session so that one can interact with the file and call its methods. Alternatively, it is possible to generate automatically a jupyter notebook to execute code.
abipy.scripts.abips module
Script to download and install pseudopotential tables from the web.
- abipy.scripts.abips.abips_avail(options)[source]
Show available pseudopotential repos.
- Return type:
- abipy.scripts.abips.abips_install(options)[source]
Install pseudopotential repositories by name(s). Use avail command to get repo names.
- Return type:
- abipy.scripts.abips.abips_show(options)[source]
Show info on pseudopotential table(s).
- Return type:
- abipy.scripts.abips.abips_element(options)[source]
Find all pseudos in the installed tables for the given element (symbol or znucl).
- Return type:
abipy.scripts.abirun module
The abirun.py script allows the user to submit the calculations contained in an AbiPy Flow. It provides a command line interface as well graphical interfaces.
- abipy.scripts.abirun.parse_strings(s)[source]
Parse comma separated values. Return None if s is None.
- abipy.scripts.abirun.flowdir_wname_tname(dirname)[source]
” Given a initial directory dirname containing a node of the Flow, this function locates the directory of the flow (e.g. the directory with the pickle file) and returns the name of the work and/or of the node.
Return: flowdir, wname, tname
where flowdir is the directory containing the pickle file, wname and tname are the basenames of the work/task.
If dirname contains the pickle file we have (wname, tname) == (None, None) If dirname is a work –> wname is it’s basename and tname is None If dirname is a task –> os.path.join(flowdir, wname, tname) == task.workdir.
- abipy.scripts.abirun.select_nids(flow, options)[source]
Return the set of node ids selected by the user via the command line interface.
- Return type:
- abipy.scripts.abirun.flow_debug_reset_tasks(flow, nids=None, verbose=0)[source]
Analyze error files produced by reset tasks for possible error messages
- Parameters:
nids – List of node identifiers. By defaults all nodes that have been resetted are analyzed.
verbose – Verbosity level.
- Return type:
- abipy.scripts.abirun.flow_watch_status(flow, delay=5, nids=None, verbose=0, func_name='show_func')[source]
Enter an infinite loop and delay execution for the given number of seconds. (default: 5 secs).
- Parameters:
delay – delay execution for the given number of seconds. (default: 5 secs).
nids – List of node identifiers. By defaults all nodes that have been resetted are analyzed.
verbose – Verbosity level.
func_name – Name of the function used to show the status of the flow.
abipy.scripts.abislurm module
This script retrieve information on Slurm jobs.
abipy.scripts.abistruct module
Script to analyze/export/visualize the crystal structure saved in the netcdf files produced by ABINIT.
- abipy.scripts.abistruct.save_structure(structure, options)[source]
Save structure to file.
- Return type:
abipy.scripts.abiview module
This script visualizes results with external graphical applications. or convert data from Abinit files (usually netcdf) to other formats.
- abipy.scripts.abiview.handle_overwrite(path, options)[source]
Exit 1 if file
path
exists and not options.force else return path.
- abipy.scripts.abiview.df_to_clipboard(options, df)[source]
Copy dataframe to clipboard if options.clipboard.
- Return type:
- class abipy.scripts.abiview.NegateAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]
Bases:
Action
- abipy.scripts.abiview.abiview_structure(options)[source]
Visualize the structure with the specified visualizer. Requires external app or optional python modules (mayavi, vtk)
- abipy.scripts.abiview.abiview_input(options)[source]
Read input file from netcdf file and print it to terminal.
- abipy.scripts.abiview.abiview_hist(options)[source]
Visualize structural relaxation/molecular-dynamics run from data stored in the HIST.nc file. Requires mayavi.
- abipy.scripts.abiview.abiview_data(options)[source]
Extract data from a generic text file with results in tabular format and plot data with matplotlib. Multiple datasets are supported. No attempt is made to handle metadata (e.g. column name)
- abipy.scripts.abiview.abiview_dirviz(options)[source]
Visualize directory tree with graphviz.
- Return type:
- abipy.scripts.abiview.abiview_ebands(options)[source]
Plot electronic bands if file contains high-symmetry k-path or DOS if k-sampling. Accept any file with ElectronBands e.g. GSR.nc, WFK.nc, …
- Return type:
- abipy.scripts.abiview.abiview_effmass(options)[source]
Compute electron effective masses with finite differences using energies along a k-path Accept any file with ElectronBands e.g. GSR.nc, WFK.nc, …
- Return type:
- abipy.scripts.abiview.abiview_skw(options)[source]
Interpolate energies in k-space along a k-path with the star-function method. Note that the interpolation will likely fail if there are symmetric k-points in the input set of k-points so it is highly recommended to call this method with energies obtained in the IBZ. Accept any file with ElectronBands e.g. GSR.nc, WFK.nc, …
- Return type:
- abipy.scripts.abiview.abiview_fs(options)[source]
Extract eigenvalues in the IBZ from file and visualize Fermi surface with the external application specified via –appname
- Return type:
- abipy.scripts.abiview.abiview_ifermi_fs(options)[source]
Use ifermi package to visualize the Fermi surface. Requires netcdf file with energies in the IBZ. See <https://fermisurfaces.github.io/IFermi/>
- Return type:
- abipy.scripts.abiview.abiview_ddb(options)[source]
Invoke anaddb to compute phonon bands and DOS from the DDB, plot the results.
- Return type:
- abipy.scripts.abiview.abiview_ddb_vs(options)[source]
Compute speed of sound by fitting phonon frequencies along selected directions.
- Return type:
- abipy.scripts.abiview.abiview_ddb_ir(options)[source]
Compute infra-red spectrum from DDB. Plot results.
- Return type:
- abipy.scripts.abiview.abiview_ddb_asr(options)[source]
Compute phonon band structure from DDB with/without acoustic sum rule. Plot results.
- Return type:
- abipy.scripts.abiview.abiview_ddb_dipdip(options)[source]
Compute phonon band structure from DDB with/without dipole-dipole interaction. Plot results.
- Return type:
- abipy.scripts.abiview.abiview_ddb_quad(options)[source]
Compute phonon band structure from DDB with/without quadrupole terms. Plot results.
- Return type:
- abipy.scripts.abiview.abiview_ddb_isodistort_ph(options)[source]
Compute ph-freqs for given q-point (default: Gamma), produce CIF files for unperturbed and distorded structure that can be used with ISODISTORT (https://stokes.byu.edu/iso/isodistort.php) to analyze the symmetry of phonon modes. See README.me file produced in output directory.
- Return type:
- abipy.scripts.abiview.abiview_ddb_qpt(options)[source]
Compute ph-frequencies at the selected q-point without passing through the Fourier interpolation of the interatomic force constants.
- Return type:
- abipy.scripts.abiview.abiview_ddb_ifc(options)[source]
Visualize interatomic force constants in real space.
- Return type:
- abipy.scripts.abiview.abiview_phbands(options)[source]
Plot phonon bands. Accept any file with PhononBands e.g. PHBST.nc, …
- Return type:
- abipy.scripts.abiview.abiview_denpot(options)[source]
Visualize netcdf DEN/POT files with –appname (default: Vesta). NB: Appplication must be installed and in $PATH.
- Return type:
- abipy.scripts.abiview.abiview_lobster(options)[source]
Analyze lobster output files in directory.
- Return type:
abipy.scripts.oncv module
Script to generate/analyze/plot ONCVPSP pseudopotentials.
- abipy.scripts.oncv.oncv_notebook(options)[source]
Generate jupyter notebook to plot data. Requires oncvpsp output file.
- abipy.scripts.oncv.oncv_print(options)[source]
Parse oncvps output file and print results to terminal.
- Return type:
- abipy.scripts.oncv.oncv_plot(options)[source]
Plot data with matplotlib. Requires oncvpsp output file.
- Return type:
- abipy.scripts.oncv.oncv_plot_pseudo(options)[source]
Plot data with matplotlib. Requires pseudopotential file (UPF2 or pawxml).
- Return type:
- abipy.scripts.oncv.oncv_compare(options)[source]
Compare multiple oncvpsp output files.
- Return type:
- abipy.scripts.oncv.oncv_run(options)[source]
Run oncvpsp, generate djrepo file, plot results. Requires oncvps input file.