|
41 | 41 | with contextlib.suppress(ImportError): |
42 | 42 | import espressomd.io.vtk |
43 | 43 |
|
44 | | -with contextlib.suppress(ImportError): |
45 | | - import ase |
46 | | - import espressomd.plugins.ase |
47 | | - |
48 | 44 | with contextlib.suppress(ImportError): |
49 | 45 | import h5py # h5py has to be imported *after* espressomd (MPI) |
50 | 46 |
|
|
57 | 53 | has_thermalized_bonds = 'THERM.LB' in modes or 'THERM.LANGEVIN' in modes |
58 | 54 | has_drude = (espressomd.has_features(['ELECTROSTATICS', 'MASS', 'ROTATION']) |
59 | 55 | and has_thermalized_bonds) |
60 | | -has_ase = 'ASE' in modes |
61 | 56 |
|
62 | 57 |
|
63 | 58 | class CheckpointTest(ut.TestCase): |
@@ -472,14 +467,13 @@ def test_particle_properties(self): |
472 | 467 | self.assertEqual( |
473 | 468 | p3.swimming, |
474 | 469 | {"f_swim": 0.03, "is_engine_force_on_fluid": False}) |
475 | | - if espressomd.has_features( |
476 | | - 'VIRTUAL_SITES_RELATIVE') and has_lb_mode and not has_ase: |
| 470 | + if espressomd.has_features('VIRTUAL_SITES_RELATIVE') and has_lb_mode: |
477 | 471 | self.assertEqual( |
478 | 472 | p4.swimming, |
479 | 473 | {"f_swim": 0., "is_engine_force_on_fluid": True}) |
480 | 474 | if espressomd.has_features('LB_ELECTROHYDRODYNAMICS') and has_lb_mode: |
481 | 475 | np.testing.assert_allclose(np.copy(p8.mu_E), [-0.1, 0.2, -0.3]) |
482 | | - if espressomd.has_features('VIRTUAL_SITES_RELATIVE') and not has_ase: |
| 476 | + if espressomd.has_features('VIRTUAL_SITES_RELATIVE'): |
483 | 477 | from scipy.spatial.transform import Rotation as R |
484 | 478 | q_ind = ([1, 2, 3, 0],) # convert from scalar-first to scalar-last |
485 | 479 | vs_id, vs_dist, vs_quat = p2.vs_relative |
@@ -765,7 +759,6 @@ def test_drude_helpers(self): |
765 | 759 | self.assertEqual(dh.drude_id_list, [5]) |
766 | 760 |
|
767 | 761 | @utx.skipIfMissingFeatures(['VIRTUAL_SITES', 'VIRTUAL_SITES_RELATIVE']) |
768 | | - @ut.skipIf("ASE" in modes, "virtual sites not allowed by ASE") |
769 | 762 | def test_virtual_sites(self): |
770 | 763 | Propagation = espressomd.propagation.Propagation |
771 | 764 | p_real = system.part.by_id(0) |
@@ -1068,22 +1061,6 @@ def test_union(self): |
1068 | 1061 | p2.remove() |
1069 | 1062 | system.non_bonded_inter[2, 6].reset() |
1070 | 1063 |
|
1071 | | - @ut.skipIf("ase" not in sys.modules, "missing module 'ase'") |
1072 | | - @ut.skipIf("ASE" not in modes, "missing combination") |
1073 | | - def test_ase_plugin(self): |
1074 | | - atoms = system.ase.get() |
1075 | | - self.assertIsNotNone(atoms) |
1076 | | - self.assertIsInstance(atoms, ase.Atoms) |
1077 | | - self.assertEqual(set(atoms.get_chemical_symbols()), {"H", "O"}) |
1078 | | - np.testing.assert_equal(atoms.pbc, np.copy(system.periodicity)) |
1079 | | - np.testing.assert_allclose(atoms.cell, np.diag(system.box_l)) |
1080 | | - np.testing.assert_allclose( |
1081 | | - atoms.get_positions(), |
1082 | | - np.copy(system.part.select(lambda p: p.type in [0, 1]).pos)) |
1083 | | - np.testing.assert_allclose( |
1084 | | - atoms.get_forces(), |
1085 | | - np.copy(system.part.select(lambda p: p.type in [0, 1]).f)) |
1086 | | - |
1087 | 1064 |
|
1088 | 1065 | if __name__ == '__main__': |
1089 | 1066 | config.bind_test_class(CheckpointTest) |
|
0 commit comments