mirror of https://github.com/abinit/abipy.git
Fix travis
This commit is contained in:
parent
ce6e191734
commit
cf3e9e80ab
10
.travis.yml
10
.travis.yml
|
@ -6,11 +6,11 @@ sudo: false
|
|||
|
||||
env:
|
||||
global:
|
||||
- ABINIT_VERSION=8.8.2
|
||||
- ABIPY_PYTEST=yes
|
||||
- OPENBLAS_NUM_THREADS=1
|
||||
- OMP_NUM_THREADS=1
|
||||
- secure: l+S0aIlco/q33mJhkX76/WykVvALOIPSBIq8smQUUXbGj7kBCjNLCj8P26WnjB5FwUFKjh5svlCrT0oqdiiSimVUuUKdozB8zKa0fyMa8G1//WKSwwsfVlQlcDxWEh9pT7Ox39Jau1ODz31tYvVwdCgEQohk/0uc92uLp4/Q9gSfLdtyW1qGx+2fFBO/Slfb6makdYsRk+QQmHwC+lqnghhzP4dIbWmSy1+EDGcSQN9UFWPEcYi3Thh9TAkZ1iQEEDQptebddESYPPHlgvWfk1hGaBG481jI/Ydmz6FFbXkLCY/bLZ/cntzPEImZFJVGEbK5nfWJpd6es9KcslMPDW5sDWbd6pL4W/mkUGdAqq/Mi/hr/yECmBLmbt13BzyPDqbfwkv/kRGqIKOHVv6RtpgaIoZXe/OR/M9kY+lI6/Oye7MgknRqzYqt6Nh6bXno3LyvDHwfApN9aUqUx6LFAmpZ2/Ki6CAvl54oXR9CPNQPzDQ5Rprjia4GJogPHQ2MsceNbIimZJXSqN9vLnhB5aYF5Oh+9out1Uv9n2D42vadguCvvjUJJWLMfqFtLDT9rme1Ye1cHtajDvDpXS1ddfvts5bum17nLUiE+mfViJBjwvJwSEGJoeQzfln4i4jQo3VQFoZDDRPJKT3cooeNdhtB09gfF0SbcB16A2DCquk=
|
||||
- ABINIT_VERSION=8.8.2
|
||||
- ABIPY_PYTEST=yes
|
||||
- OPENBLAS_NUM_THREADS=1
|
||||
- OMP_NUM_THREADS=1
|
||||
- secure: l+S0aIlco/q33mJhkX76/WykVvALOIPSBIq8smQUUXbGj7kBCjNLCj8P26WnjB5FwUFKjh5svlCrT0oqdiiSimVUuUKdozB8zKa0fyMa8G1//WKSwwsfVlQlcDxWEh9pT7Ox39Jau1ODz31tYvVwdCgEQohk/0uc92uLp4/Q9gSfLdtyW1qGx+2fFBO/Slfb6makdYsRk+QQmHwC+lqnghhzP4dIbWmSy1+EDGcSQN9UFWPEcYi3Thh9TAkZ1iQEEDQptebddESYPPHlgvWfk1hGaBG481jI/Ydmz6FFbXkLCY/bLZ/cntzPEImZFJVGEbK5nfWJpd6es9KcslMPDW5sDWbd6pL4W/mkUGdAqq/Mi/hr/yECmBLmbt13BzyPDqbfwkv/kRGqIKOHVv6RtpgaIoZXe/OR/M9kY+lI6/Oye7MgknRqzYqt6Nh6bXno3LyvDHwfApN9aUqUx6LFAmpZ2/Ki6CAvl54oXR9CPNQPzDQ5Rprjia4GJogPHQ2MsceNbIimZJXSqN9vLnhB5aYF5Oh+9out1Uv9n2D42vadguCvvjUJJWLMfqFtLDT9rme1Ye1cHtajDvDpXS1ddfvts5bum17nLUiE+mfViJBjwvJwSEGJoeQzfln4i4jQo3VQFoZDDRPJKT3cooeNdhtB09gfF0SbcB16A2DCquk=
|
||||
|
||||
matrix:
|
||||
include:
|
||||
|
|
|
@ -69,7 +69,7 @@ class AbinitVariableDatabaseTest(AbipyTest):
|
|||
|
||||
ecut_var = docvar("ecut")
|
||||
assert ecut_var.name == "ecut"
|
||||
assert ecut_var.executable = "abinit"
|
||||
assert ecut_var.executable == "abinit"
|
||||
|
||||
elaflag = docvar("elaflag", executable="anaddb")
|
||||
assert elaflag.name == "alaflag"
|
||||
|
|
|
@ -51,7 +51,7 @@ def has_abinit(version=None, op=">=", manager=None):
|
|||
from abipy.flowtk import TaskManager, AbinitBuild
|
||||
manager = TaskManager.from_user_config() if manager is None else manager
|
||||
build = AbinitBuild(manager=manager)
|
||||
if version is not None:
|
||||
if version is None:
|
||||
return build.version != "0.0.0"
|
||||
else:
|
||||
return cmp_version(build.version, version, op=op)
|
||||
|
|
|
@ -266,18 +266,9 @@ class AnaddbNcRobot(Robot):
|
|||
return all(ncfile.has_elastic_data for ncfile in self.abifiles)
|
||||
|
||||
def get_dataframe(self):
|
||||
|
||||
if self.has_elastic_data:
|
||||
return self.get_elastic_dataframe()
|
||||
#for ncfile in self.abifiles:
|
||||
# df = ncfile.elastic_data.get_elast_properties_dataframe(etypes=["elastic_relaxed"])
|
||||
# df_list.append(df)
|
||||
|
||||
#df_list = []
|
||||
#df = pd.concat(df_list, ignore_index=True)
|
||||
#df["labels"] = list(self.keys())
|
||||
#df.set_index("labels", inplace=True)
|
||||
#return df
|
||||
return None
|
||||
|
||||
def get_elastic_dataframe(self, with_geo=True, abspath=False, with_params=False, funcs=None, **kwargs):
|
||||
"""
|
||||
|
@ -370,34 +361,6 @@ class AnaddbNcRobot(Robot):
|
|||
#def get_voigt_dataframe(self, tensor_names):
|
||||
# ncfile.get_voigt_dataframe(self, tensor_names):
|
||||
|
||||
# @add_fig_kwargs
|
||||
# def plot_gsr_convergence(self, sortby=None, hue=None, fontsize=6,
|
||||
# items=("energy", "pressure", "max_force"), **kwargs):
|
||||
# """
|
||||
# Plot the convergence of the most important quantities available in the GSR file
|
||||
# wrt to the ``sortby`` parameter. Values can optionally be grouped by ``hue``.
|
||||
#
|
||||
# Args:
|
||||
# sortby: Define the convergence parameter, sort files and produce plot labels.
|
||||
# Can be None, string or function. If None, no sorting is performed.
|
||||
# If string and not empty it's assumed that the abifile has an attribute
|
||||
# with the same name and `getattr` is invoked.
|
||||
# If callable, the output of sortby(abifile) is used.
|
||||
# hue: Variable that define subsets of the data, which will be drawn on separate lines.
|
||||
# Accepts callable or string
|
||||
# If string, it's assumed that the abifile has an attribute with the same name and getattr is invoked.
|
||||
# If callable, the output of hue(abifile) is used.
|
||||
# items: List of GSR attributes (or callables) to be analyzed.
|
||||
# fontsize: legend and label fontsize.
|
||||
#
|
||||
# Returns: |matplotlib-Figure|
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# robot.plot_gsr_convergence(sortby="nkpt", hue="tsmear")
|
||||
# """
|
||||
# return self.plot_convergence_items(items, sortby=sortby, hue=hue, fontsize=fontsize, show=False, **kwargs)
|
||||
|
||||
def yield_figs(self, **kwargs): # pragma: no cover
|
||||
"""
|
||||
This function *generates* a predefined list of matplotlib figures with minimal input from the user.
|
||||
|
|
|
@ -11,7 +11,7 @@ import pandas as pd
|
|||
import abipy.core.abinit_units as abu
|
||||
|
||||
from collections import OrderedDict
|
||||
from six.moves import map, zip, StringIO
|
||||
from six.moves import map, zip
|
||||
from monty.string import marquee, list_strings
|
||||
from monty.collections import AttrDict, dict2namedtuple, tree
|
||||
from monty.functools import lazy_property
|
||||
|
@ -21,7 +21,6 @@ from abipy.core.mixins import TextFile, Has_Structure, NotebookWriter
|
|||
from abipy.core.symmetries import AbinitSpaceGroup
|
||||
from abipy.core.structure import Structure
|
||||
from abipy.core.kpoints import KpointList, Kpoint
|
||||
from abipy.core.tensor import Tensor
|
||||
from abipy.iotools import ETSF_Reader
|
||||
from abipy.abio.inputs import AnaddbInput
|
||||
from abipy.dfpt.phonons import PhononDosPlotter, PhononBandsPlotter, InteratomicForceConstants
|
||||
|
@ -1203,6 +1202,7 @@ class DdbFile(TextFile, Has_Structure, NotebookWriter):
|
|||
with ETSF_Reader(os.path.join(task.workdir, "anaddb.nc")) as r:
|
||||
structure = r.read_structure()
|
||||
# TODO Replace with pymatgen tensors
|
||||
from abipy.core.tensor import Tensor
|
||||
emacro = Tensor.from_cartesian_tensor(r.read_value("emacro_cart"), structure.lattice, space="r"),
|
||||
becs = Becs(r.read_value("becs_cart"), structure, chneut=inp["chneut"], order="f")
|
||||
|
||||
|
@ -1527,7 +1527,7 @@ class Becs(Has_Structure):
|
|||
self.values = np.empty((len(structure), 3, 3))
|
||||
for i, bec in enumerate(becs_arr):
|
||||
mat = becs_arr[i]
|
||||
if order.lower() == "f": mat = mat.T
|
||||
if order.lower() == "f": mat = mat.T.copy()
|
||||
self.values[i] = mat
|
||||
|
||||
@property
|
||||
|
@ -1549,12 +1549,8 @@ class Becs(Has_Structure):
|
|||
app("")
|
||||
|
||||
# Add info on the bec sum rule.
|
||||
stream = StringIO()
|
||||
self.check_sumrule(stream=stream)
|
||||
app(stream.getvalue())
|
||||
|
||||
#app("Born effective charge neutrality sum-rule with chneut: %d\n" % self.chneut)
|
||||
#app(str(self.sumrule))
|
||||
app("Born effective charge neutrality sum-rule with chneut: %d\n" % self.chneut)
|
||||
app(str(self.sumrule))
|
||||
|
||||
return "\n".join(lines)
|
||||
|
||||
|
|
Loading…
Reference in New Issue