@@ -0,0 +1,1586 @@
+%22%22%22This module contains the operation functions for this project.%22%22%22%0Afrom __future__ import print_function, division, absolute_import%0A%0Aimport unittest%0A%0Aclass enthalpic_dipole_interaction(unittest.TestCase):%0A%0A    def test_gravity(self):%0A        %22%22%22This operation simulates a sedimentation experiment by using an elongated box in the z-dimension and adding an effective gravitational potential (in the absence of depletion).%22%22%22%0A        import hoomd%0A        from hoomd import hpmc, jit%0A        import numpy as np%0A%0A        hoomd.context.initialize();%0A%0A        # Just creating a simple cubic lattice # is fine here.%0A        system = hoomd.init.create_lattice(hoomd.lattice.sc(%0A            1), n=10)%0A%0A        mc = hpmc.integrate.sphere(80391, d=0.1, a=0.1)%0A        mc.overlap_checks.set('A', 'A', False)%0A        mc.shape_param.set('A', diameter=1)%0A%0A        # Expand system, add walls, and add gravity%0A        hoomd.update.box_resize(Lx=system.box.Lx*1.5, Ly = system.box.Ly*1.5,%0A                                Lz=system.box.Lz*20, scale_particles=False,%0A                                period=None)%0A        wall = hpmc.field.wall(mc)%0A        wall.add_plane_wall(%5B0, 0, 1%5D, %5B0, 0, -system.box.Lz/2%5D)%0A        gravity_field = hoomd.jit.force.user(mc=mc, code=%22return pos.z + box.getL().z/2;%22)%0A%0A        snapshot = system.take_snapshot()%0A        old_avg_z = np.mean(snapshot.particles.position%5B:, 2%5D)%0A%0A        hoomd.run(1e3)%0A%0A        snapshot = system.take_snapshot()%0A        self.assertTrue(np.mean(snapshot.particles.position%5B:, 2%5D) %3C old_avg_z)%0A%0Aif __name__ == '__main__':%0A    unittest.main()%0A

Add simple unit tests