Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gmatteo committed Nov 8, 2017
1 parent ccb9a06 commit ac26dab
Show file tree
Hide file tree
Showing 41 changed files with 72 additions and 3,252 deletions.
Empty file added .nojekill
Empty file.
27 changes: 2 additions & 25 deletions abipy/abio/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,8 +761,8 @@ def set_kptgw(self, kptgw, bdgw):
Args
kptgw: List of k-points in reduced coordinates.
bdgw: Specifies the range of bands for the GW corrections.
Accepts iterable that be reshaped to (nkptgw, 2)
or a tuple of two integers if the extrema are the same for each k-point.
Accepts iterable that be reshaped to (nkptgw, 2)
or a tuple of two integers if the extrema are the same for each k-point.
"""
kptgw = np.reshape(kptgw, (-1,3))
nkptgw = len(kptgw)
Expand Down Expand Up @@ -2704,29 +2704,6 @@ class OpticError(Exception):
class OpticInput(AbstractInput, MSONable):
"""
Input file for optic executable
Example:
&FILES
ddkfile_1 = 'abo_1WF7',
ddkfile_2 = 'abo_1WF8',
ddkfile_3 = 'abo_1WF9',
wfkfile = 'abo_WFK'
/
&PARAMETERS
broadening = 0.002,
domega = 0.0003,
maxomega = 0.3,
scissor = 0.000,
tolerance = 0.002
/
&COMPUTATIONS
num_lin_comp = 1,
lin_comp = 11,
num_nonlin_comp = 2,
nonlin_comp = 123,222,
num_linel_comp = 0,
num_nonlin2_comp = 0,
/
"""
Error = OpticError

Expand Down
2 changes: 1 addition & 1 deletion abipy/core/mesh3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def gvecs(self):

@lazy_property
def gmods(self):
"""[ng] array with |G|"""
"""[ng] array with $|G|$"""
gmet = np.dot(self.inv_vectors.T, self.inv_vectors)
gmods = np.empty(self.size)
for i, g in enumerate(self.gvecs):
Expand Down
2 changes: 1 addition & 1 deletion abipy/core/skw.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ def plot_dos_vs_kmeshes(self, kmeshes, is_shift=None, method="gaussian", step=0.
method: String defining the method for the computation of the DOS.
step: Energy step (eV) of the linear mesh.
width: Standard deviation (eV) of the gaussian.
ax: matplotlib :class:`Axes` or None if a new figure should be created.
ax: matplotlib `Axes` or None if a new figure should be created.
Returns:
matplotlib figure.
Expand Down
11 changes: 7 additions & 4 deletions abipy/core/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,10 @@ def rocksalt(cls, a, species, **kwargs):
species: Chemical species. See __init__ method of :class:`pymatgen.Structure`
kwargs: All keyword arguments accepted by :class:`pymatgen.Structure`
Example::
.. Example::
Structure.rocksalt(a, ["Na", "Cl"])
"""
lattice = 0.5 * float(a) * np.array([
0, 1, 1,
Expand Down Expand Up @@ -462,7 +463,7 @@ def from_abivars(cls, *args, **kwargs):
"""
Build a :class:`Structure` object from a dictionary with ABINIT variables.
Example::
.. Example::
al_structure = Structure.from_abivars(
acell=3*[7.5],
Expand Down Expand Up @@ -697,10 +698,11 @@ def spget_equivalent_atoms(self, symprec=1e-3, angle_tolerance=5, printout=False
eqmap: Mapping irred atom position --> list with positions of symmetrical atoms
spgdata: spglib dataset with additional data reported by spglib.
Example::
.. Example::
for irr_pos in irred_pos:
eqmap[irr_pos] # List of symmetrical positions associated to the irr_pos atom.
"""
spgan = SpacegroupAnalyzer(self, symprec=symprec, angle_tolerance=angle_tolerance)
spgdata = spgan.get_symmetry_dataset()
Expand Down Expand Up @@ -1735,13 +1737,14 @@ def dataframes_from_structures(struct_objects, index=None, with_spglib=True, car
`coords` the atomic positions.
The list of structures is available in the `structures` entry.
Example::
.. Example::
dfs = dataframes_from_structures(files)
dfs.lattice
dfs.coords
for structure in dfs.structures:
print(structure)
"""
structures = [Structure.as_structure(obj) for obj in struct_objects]
# Build Frame with lattice parameters.
Expand Down
1 change: 0 additions & 1 deletion abipy/dfpt/ddb.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ def anacompare_phdos(self, nqsmalls, asr=2, chneut=1, dipdip=1, dos_method="tetr
Return:
`namedtuple` with the following attributes:
phdoses: List of :class:`PhononDos` objects
plotter: :class:`PhononDosPlotter` object. Client code can use `plotter.gridplot()`
to visualize the results.
Expand Down
2 changes: 1 addition & 1 deletion abipy/dfpt/gruneisen.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def plot_doses(self, xlims=None, dos_names="all", with_idos=True, **kwargs):
xlims: Set the data limits for the x-axis in eV. Accept tuple e.g. `(left, right)`
or scalar e.g. `left`. If left (right) is None, default values are used
dos_names: List of strings defining the DOSes to plot. Use `all` to plot all DOSes available.
with_idos: True to display integrated doses
with_idos: True to display integrated doses.
Returns:
matplotlib figure.
Expand Down
18 changes: 8 additions & 10 deletions abipy/dfpt/phonons.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ def plot(self, ax=None, units="eV", qlabels=None, branch_range=None, match_bands
units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz").
Case-insensitive.
qlabels: dictionary whose keys are tuples with the reduced coordinates of the q-points.
The values are the labels. e.g. qlabels = {(0.0,0.0,0.0): "$\Gamma$", (0.5,0,0): "L"}.
The values are the labels. e.g. ``qlabels = {(0.0,0.0,0.0): "$\Gamma$", (0.5,0,0): "L"}``.
branch_range: Tuple specifying the minimum and maximum branch index to plot (default: all branches are plotted).
match_bands: if True the bands will be matched based on the scalar product between the eigenvectors.
Expand Down Expand Up @@ -951,7 +951,7 @@ def plot_colored_matched(self, ax=None, units="eV", qlabels=None, branch_range=N
ax: matplotlib :class:`Axes` or None if a new figure should be created.
units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive.
qlabels: dictionary whose keys are tuples with the reduced coordinates of the q-points.
The values are the labels. e.g. qlabels = {(0.0,0.0,0.0): "$\Gamma$", (0.5,0,0): "L"}
The values are the labels. e.g. ``qlabels = {(0.0,0.0,0.0): "$\Gamma$", (0.5,0,0): "L"}``
branch_range: Tuple specifying the minimum and maximum branch_i index to plot (default: all branches are plotted).
colormap: matplotlib colormap to determine the colors available. The colors will be chosen not in a
sequential order to avoid difficulties in distinguishing the lines.
Expand Down Expand Up @@ -1203,7 +1203,7 @@ def plot_fatbands(self, units="eV", colormap="jet", phdos_file=None,
ylims: Set the data limits for the y-axis. Accept tuple e.g. `(left, right)`
or scalar e.g. `left`. If left (right) is None, default values are used
qlabels: dictionary whose keys are tuples with the reduced coordinates of the q-points.
The values are the labels. e.g. qlabels = {(0.0,0.0,0.0): "$\Gamma$", (0.5,0,0): "L"}.
The values are the labels. e.g. ``qlabels = {(0.0,0.0,0.0): "$\Gamma$", (0.5,0,0): "L"}``.
Returns:
`matplotlib` figure.
Expand Down Expand Up @@ -1320,7 +1320,7 @@ def plot_with_phdos(self, phdos, units="eV", qlabels=None, axlist=None, **kwargs
phdos: An instance of :class:`PhononDos` or netcdf file providing a PhononDos object.
units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive.
qlabels: dictionary whose keys are tuples with the reduced coordinates of the q-points.
The values are the labels e.g. qlabels = {(0.0,0.0,0.0):"$\Gamma$", (0.5,0,0):"L"}.
The values are the labels e.g. ``qlabels = {(0.0,0.0,0.0):"$\Gamma$", (0.5,0,0):"L"}``.
axlist: The axes for the bandstructure plot and the DOS plot. If axlist is None, a new figure
is created and the two axes are automatically generated.
Expand Down Expand Up @@ -1436,7 +1436,7 @@ def to_pymatgen(self, qlabels=None):
Args:
qlabels: dictionary whose keys are tuples with the reduced coordinates of the q-points.
The values are the labels e.g. qlabels = {(0.0,0.0,0.0):"$\Gamma$", (0.5,0,0):"L"}.
The values are the labels e.g. ``qlabels = {(0.0,0.0,0.0):"$\Gamma$", (0.5,0,0):"L"}``.
If None labels will be determined automatically.
"""
# pymatgen labels dict is inverted
Expand Down Expand Up @@ -2291,12 +2291,10 @@ def phbands_gridplot(phb_objects, titles=None, phdos_objects=None, phdos_kwargs=
phb_objects: List of objects from which the phonon band structures are extracted.
Each item in phb_objects is either a string with the path of the netcdf file,
or one of the abipy object with an `phbands` attribute or a :class:`PhononBands` object.
phdos_objects:
List of objects from which the phonon DOSes are extracted.
phdos_objects: List of objects from which the phonon DOSes are extracted.
Accept filepaths or :class:`PhononDos` objects. If phdos_objects is not None,
each subplot in the grid contains a band structure with DOS else a simple bandstructure plot.
titles:
List of strings with the titles to be added to the subplots.
titles: List of strings with the titles to be added to the subplots.
phdos_kwargs: optional dictionary with the options passed to `get_phdos` to compute the phonon DOS.
Used only if `phdos_objects` is not None.
units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive.
Expand Down Expand Up @@ -2555,7 +2553,7 @@ def combiplot(self, qlabels=None, units='eV', ylims=None, **kwargs):
Args:
units: Units for phonon plots. Possible values in ("eV", "meV", "Ha", "cm-1", "Thz"). Case-insensitive.
qlabels: dictionary whose keys are tuples with the reduced coordinates of the k-points.
The values are the labels e.g. klabels = {(0.0,0.0,0.0): "$\Gamma$", (0.5,0,0): "L"}.
The values are the labels e.g. ``klabels = {(0.0,0.0,0.0): "$\Gamma$", (0.5,0,0): "L"}``.
ylims: Set the data limits for the y-axis. Accept tuple e.g. `(left, right)`
or scalar e.g. `left`. If left (right) is None, default values are used
Expand Down
2 changes: 1 addition & 1 deletion abipy/dynamics/hist.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def etotals(self):

def get_relaxation_analyzer(self):
"""
Return a pymatgen :class:`RelaxationAnalyzer object to analyze the relaxation in a calculation.
Return a pymatgen :class:`RelaxationAnalyzer` object to analyze the relaxation in a calculation.
"""
from pymatgen.analysis.structure_analyzer import RelaxationAnalyzer
return RelaxationAnalyzer(self.initial_structure, self.final_structure)
Expand Down
8 changes: 4 additions & 4 deletions abipy/electrons/bse.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def plot(self, ax=None, *args, **kwargs):
Plot all the components of the tensor
Args:
ax: matplotlib :class:`Axes` or None if a new figure should be created.
ax: matplotlib `Axes` or None if a new figure should be created.
============== ==============================================================
kwargs Meaning
Expand Down Expand Up @@ -249,7 +249,7 @@ def plot(self, ax=None, **kwargs):
Plot the MDF.
Args:
ax: matplotlib :class:`Axes` or None if a new figure should be created.
ax: matplotlib `Axes` or None if a new figure should be created.
============== ==============================================================
kwargs Meaning
Expand Down Expand Up @@ -576,7 +576,7 @@ def plot(self, ax=None, cplx_mode="Im", qpoint=None, xlims=None, ylims=None, **k
Get a matplotlib plot showing the MDFs.
Args:
ax: matplotlib :class:`Axes` or None if a new figure should be created.
ax: matplotlib `Axes` or None if a new figure should be created.
cplx_mode: string defining the data to print (case-insensitive).
Possible choices are `re` for the real part, `im` for imaginary part only. `abs` for the absolute value.
Options can be concated with "-".
Expand Down Expand Up @@ -808,7 +808,7 @@ def plot_mdftype_cplx(self, mdf_type, cplx_mode, qpoint=None, ax=None,
Helper function to plot data corresponds to `mdf_type`, `cplx_mode`, `qpoint`.
Args:
ax: matplotlib :class:`Axes` or None if a new figure should be created.
ax: matplotlib `Axes` or None if a new figure should be created.
mdf_type:
cplx_mode: string defining the data to print (case-insensitive).
Possible choices are `re` for the real part, `im` for imaginary part only. `abs` for the absolute value.
Expand Down
2 changes: 1 addition & 1 deletion abipy/examples/plot/plot_optic.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# Remember to close the file.
ncfile.close()

# Use OpticRobot to analyze multiple file e.g convergence studies.
# Use OpticRobot to analyze multiple file e.g. convergence studies.
filenames = [
abidata.ref_file("gaas_444_OPTIC.nc"),
abidata.ref_file("gaas_888_OPTIC.nc"),
Expand Down
2 changes: 1 addition & 1 deletion abipy/examples/plot/plot_qpbands_with_interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
plotter.combiplot(title="Combiplot")
plotter.boxplot(swarm=True, title="Boxplot")
plotter.combiboxplot(swarm=True, title="Combiboxplot")
# sphinx_gallery_thumbnail_number = 6
# sphinx_gallery_thumbnail_number = 4
plotter.gridplot(title="Gridplot")

sigres.close()
4 changes: 2 additions & 2 deletions abipy/examples/plot/plot_scr_matrix.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env python
r"""
SCF matrix
SCR matrix
==========
This examples shows how to plot the matrix elements of the
This examples shows how to plot the matrix elements of the
inverse dielectric function stored in the SCR file (optdriver 3)
See also `plot_scr.py` for the optical spectrum.
"""
Expand Down
9 changes: 6 additions & 3 deletions docs/README.rst → docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
AbiPy documentation
===================
## AbiPy documentation

This is the top level build directory for the AbiPy documentation.
All of the documentation is written using sphinx, a python documentation system built on top of ReST.
Expand All @@ -23,10 +22,14 @@ This directory contains:

* _templates - used by the sphinx build system

To build the HTML documentation, install sphinx then type "make html" that will execute::
To build the HTML documentation, install sphinx then type `make html` that will execute::

sphinx-build -b html -d _build/doctrees . _build/html

The documentation is produced in `_build/html`.

You can run ``make help`` to see information on all possible make targets.

To deploy to gh-pages::

ghp-import _build/html/ -n -p
3 changes: 1 addition & 2 deletions docs/api/display_api.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
display Package
===============


:mod:`display` Module
=====================
---------------------

.. automodule:: abipy.display
:members:
Expand Down
15 changes: 0 additions & 15 deletions docs/api/htc/abinitinput.rst

This file was deleted.

8 changes: 0 additions & 8 deletions docs/api/htc/filesfile.rst

This file was deleted.

13 changes: 0 additions & 13 deletions docs/api/htc/index.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs/api/htc/input.rst

This file was deleted.

8 changes: 0 additions & 8 deletions docs/api/htc/inputfile.rst

This file was deleted.

26 changes: 0 additions & 26 deletions docs/api/htc/jobfile.rst

This file was deleted.

Loading

0 comments on commit ac26dab

Please sign in to comment.