diff --git a/atomistics/calculators/__init__.py b/atomistics/calculators/__init__.py index e69de29b..5fa8c542 100644 --- a/atomistics/calculators/__init__.py +++ b/atomistics/calculators/__init__.py @@ -0,0 +1,10 @@ +from atomistics.calculators.ase import evaluate_with_ase + +try: + from atomistics.calculators.lammps import ( + evaluate_with_lammps, + evaluate_with_lammps_library, + get_potential_dataframe, + ) +except ImportError: + pass diff --git a/atomistics/workflows/__init__.py b/atomistics/workflows/__init__.py index e69de29b..63d0a639 100644 --- a/atomistics/workflows/__init__.py +++ b/atomistics/workflows/__init__.py @@ -0,0 +1,9 @@ +from atomistics.workflows.elastic.workflow import ElasticMatrixWorkflow +from atomistics.workflows.evcurve.workflow import EnergyVolumeCurveWorkflow +from atomistics.workflows.langevin.workflow import LangevinWorkflow +from atomistics.workflows.phonons.workflow import PhonopyWorkflow +from atomistics.workflows.quasiharmonic.workflow import QuasiHarmonicWorkflow +from atomistics.workflows.structure_optimization.workflow import ( + optimize_positions, + optimize_positions_and_volume, +) diff --git a/tests/test_elastic_emt.py b/tests/test_elastic_emt.py index 7c6d0ccf..efc6777f 100644 --- a/tests/test_elastic_emt.py +++ b/tests/test_elastic_emt.py @@ -3,8 +3,8 @@ import numpy as np import unittest -from atomistics.calculators.ase import evaluate_with_ase -from atomistics.workflows.elastic.workflow import ElasticMatrixWorkflow +from atomistics.calculators import evaluate_with_ase +from atomistics.workflows import ElasticMatrixWorkflow class TestElastic(unittest.TestCase): diff --git a/tests/test_elastic_gpaw.py b/tests/test_elastic_gpaw.py index 57b620f0..6b97e402 100644 --- a/tests/test_elastic_gpaw.py +++ b/tests/test_elastic_gpaw.py @@ -2,8 +2,8 @@ import numpy as np import unittest -from atomistics.calculators.ase import evaluate_with_ase -from atomistics.workflows.elastic.workflow import ElasticMatrixWorkflow +from atomistics.calculators import evaluate_with_ase +from atomistics.workflows import ElasticMatrixWorkflow try: from gpaw import GPAW, PW diff --git a/tests/test_elastic_lammps.py b/tests/test_elastic_lammps.py index 6d12ad23..403006f7 100644 --- a/tests/test_elastic_lammps.py +++ b/tests/test_elastic_lammps.py @@ -4,11 +4,10 @@ import numpy as np import unittest -from atomistics.workflows.elastic.workflow import ElasticMatrixWorkflow -from atomistics.workflows.structure_optimization.workflow import optimize_positions_and_volume +from atomistics.workflows import ElasticMatrixWorkflow, optimize_positions_and_volume try: - from atomistics.calculators.lammps import ( + from atomistics.calculators import ( evaluate_with_lammps, get_potential_dataframe ) diff --git a/tests/test_evcurve_abinit.py b/tests/test_evcurve_abinit.py index 704c294a..acca7f28 100644 --- a/tests/test_evcurve_abinit.py +++ b/tests/test_evcurve_abinit.py @@ -5,8 +5,8 @@ from ase.units import Ry import unittest -from atomistics.calculators.ase import evaluate_with_ase -from atomistics.workflows.evcurve.workflow import EnergyVolumeCurveWorkflow +from atomistics.calculators import evaluate_with_ase +from atomistics.workflows import EnergyVolumeCurveWorkflow if shutil.which("abinit") is not None: diff --git a/tests/test_evcurve_emt.py b/tests/test_evcurve_emt.py index 558b69b1..3a5b2ab2 100644 --- a/tests/test_evcurve_emt.py +++ b/tests/test_evcurve_emt.py @@ -3,8 +3,8 @@ import numpy as np import unittest -from atomistics.calculators.ase import evaluate_with_ase -from atomistics.workflows.evcurve.workflow import EnergyVolumeCurveWorkflow +from atomistics.calculators import evaluate_with_ase +from atomistics.workflows import EnergyVolumeCurveWorkflow class TestEvCurve(unittest.TestCase): diff --git a/tests/test_evcurve_gpaw.py b/tests/test_evcurve_gpaw.py index 3171438b..732e5bda 100644 --- a/tests/test_evcurve_gpaw.py +++ b/tests/test_evcurve_gpaw.py @@ -2,8 +2,8 @@ import numpy as np import unittest -from atomistics.calculators.ase import evaluate_with_ase -from atomistics.workflows.evcurve.workflow import EnergyVolumeCurveWorkflow +from atomistics.calculators import evaluate_with_ase +from atomistics.workflows import EnergyVolumeCurveWorkflow try: diff --git a/tests/test_evcurve_lammps.py b/tests/test_evcurve_lammps.py index 489fd84b..f498e4d8 100644 --- a/tests/test_evcurve_lammps.py +++ b/tests/test_evcurve_lammps.py @@ -4,12 +4,11 @@ import numpy as np import unittest -from atomistics.workflows.evcurve.workflow import EnergyVolumeCurveWorkflow -from atomistics.workflows.structure_optimization.workflow import optimize_positions_and_volume +from atomistics.workflows import EnergyVolumeCurveWorkflow, optimize_positions_and_volume try: - from atomistics.calculators.lammps import ( + from atomistics.calculators import ( evaluate_with_lammps, get_potential_dataframe ) diff --git a/tests/test_evcurve_qe.py b/tests/test_evcurve_qe.py index 359eb3c9..43d225f3 100644 --- a/tests/test_evcurve_qe.py +++ b/tests/test_evcurve_qe.py @@ -4,8 +4,8 @@ from ase.calculators.espresso import Espresso import unittest -from atomistics.calculators.ase import evaluate_with_ase -from atomistics.workflows.evcurve.workflow import EnergyVolumeCurveWorkflow +from atomistics.calculators import evaluate_with_ase +from atomistics.workflows import EnergyVolumeCurveWorkflow quantum_espresso_command = "pw.x" diff --git a/tests/test_evcurve_siesta.py b/tests/test_evcurve_siesta.py index a269e2f3..7e4ef446 100644 --- a/tests/test_evcurve_siesta.py +++ b/tests/test_evcurve_siesta.py @@ -6,8 +6,8 @@ from ase.units import Ry import unittest -from atomistics.calculators.ase import evaluate_with_ase -from atomistics.workflows.evcurve.workflow import EnergyVolumeCurveWorkflow +from atomistics.calculators import evaluate_with_ase +from atomistics.workflows import EnergyVolumeCurveWorkflow siesta_command = "siesta" diff --git a/tests/test_langevin_lammps.py b/tests/test_langevin_lammps.py index cb908cf1..211960d7 100644 --- a/tests/test_langevin_lammps.py +++ b/tests/test_langevin_lammps.py @@ -4,11 +4,11 @@ import numpy as np import unittest -from atomistics.workflows.langevin.workflow import LangevinWorkflow +from atomistics.workflows import LangevinWorkflow try: - from atomistics.calculators.lammps import ( + from atomistics.calculators import ( evaluate_with_lammps_library, get_potential_dataframe, LammpsASELibrary ) diff --git a/tests/test_optimize_positions_emt.py b/tests/test_optimize_positions_emt.py index 324e2ba1..56b2c697 100644 --- a/tests/test_optimize_positions_emt.py +++ b/tests/test_optimize_positions_emt.py @@ -4,8 +4,8 @@ from ase.optimize import BFGS import unittest -from atomistics.calculators.ase import evaluate_with_ase -from atomistics.workflows.structure_optimization.workflow import optimize_positions +from atomistics.calculators import evaluate_with_ase +from atomistics.workflows import optimize_positions class TestOptimizePositionsEMT(unittest.TestCase): diff --git a/tests/test_optimize_positions_lammps.py b/tests/test_optimize_positions_lammps.py index f9ff5dd3..9deed2cf 100644 --- a/tests/test_optimize_positions_lammps.py +++ b/tests/test_optimize_positions_lammps.py @@ -4,10 +4,10 @@ import numpy as np import unittest -from atomistics.workflows.structure_optimization.workflow import optimize_positions +from atomistics.workflows import optimize_positions try: - from atomistics.calculators.lammps import ( + from atomistics.calculators import ( evaluate_with_lammps, get_potential_dataframe ) diff --git a/tests/test_phonons_emt.py b/tests/test_phonons_emt.py index 1cffe371..a7295da5 100644 --- a/tests/test_phonons_emt.py +++ b/tests/test_phonons_emt.py @@ -3,8 +3,8 @@ from phonopy.units import VaspToTHz import unittest -from atomistics.calculators.ase import evaluate_with_ase -from atomistics.workflows.phonons.workflow import PhonopyWorkflow +from atomistics.calculators import evaluate_with_ase +from atomistics.workflows import PhonopyWorkflow class TestPhonons(unittest.TestCase): diff --git a/tests/test_phonons_gpaw.py b/tests/test_phonons_gpaw.py index 1bf46be0..3b4b91f8 100644 --- a/tests/test_phonons_gpaw.py +++ b/tests/test_phonons_gpaw.py @@ -2,8 +2,8 @@ from phonopy.units import VaspToTHz import unittest -from atomistics.calculators.ase import evaluate_with_ase -from atomistics.workflows.phonons.workflow import PhonopyWorkflow +from atomistics.calculators import evaluate_with_ase +from atomistics.workflows import PhonopyWorkflow try: from gpaw import GPAW, PW diff --git a/tests/test_phonons_lammps.py b/tests/test_phonons_lammps.py index 63104d3e..fe21ef72 100644 --- a/tests/test_phonons_lammps.py +++ b/tests/test_phonons_lammps.py @@ -4,11 +4,10 @@ from phonopy.units import VaspToTHz import unittest -from atomistics.workflows.phonons.workflow import PhonopyWorkflow -from atomistics.workflows.structure_optimization.workflow import optimize_positions_and_volume +from atomistics.workflows import PhonopyWorkflow, optimize_positions_and_volume try: - from atomistics.calculators.lammps import ( + from atomistics.calculators import ( evaluate_with_lammps, get_potential_dataframe ) diff --git a/tests/test_quasiharmonic_emt.py b/tests/test_quasiharmonic_emt.py index 08a80520..6a997b2a 100644 --- a/tests/test_quasiharmonic_emt.py +++ b/tests/test_quasiharmonic_emt.py @@ -3,8 +3,8 @@ from phonopy.units import VaspToTHz import unittest -from atomistics.calculators.ase import evaluate_with_ase -from atomistics.workflows.quasiharmonic.workflow import QuasiHarmonicWorkflow +from atomistics.calculators import evaluate_with_ase +from atomistics.workflows import QuasiHarmonicWorkflow class TestPhonons(unittest.TestCase): diff --git a/tests/test_quasiharmonic_lammps.py b/tests/test_quasiharmonic_lammps.py index c726c2b4..f3d80950 100644 --- a/tests/test_quasiharmonic_lammps.py +++ b/tests/test_quasiharmonic_lammps.py @@ -4,11 +4,10 @@ from phonopy.units import VaspToTHz import unittest -from atomistics.workflows.quasiharmonic.workflow import QuasiHarmonicWorkflow -from atomistics.workflows.structure_optimization.workflow import optimize_positions_and_volume +from atomistics.workflows import QuasiHarmonicWorkflow, optimize_positions_and_volume try: - from atomistics.calculators.lammps import ( + from atomistics.calculators import ( evaluate_with_lammps, get_potential_dataframe )