def METHOD_NAME(self):
    """Test for NpT constrained in one direction."""
    data = np.genfromtxt(tests_common.data_path("npt_lj_system.data"))
    ref_box_l = 1.01 * np.max(data[:, 0:3])
    system = self.system
    system.box_l = 3 * [ref_box_l]
    system.part.add(pos=data[:, 0:3], type=len(data) * [2])
    system.non_bonded_inter[2, 2].wca.set_params(epsilon=1., sigma=1.)
    system.time_step = 0.01
    for n in range(3):
        direction = np.roll([True, False, False], n)
        system.box_l = 3 * [ref_box_l]
        system.part.all().pos = data[:, 0:3]
        system.part.all().v = data[:, 3:6]
        system.thermostat.set_npt(kT=1.0, gamma0=2, gammav=0.004, seed=42)
        system.integrator.set_isotropic_npt(ext_pressure=2.0, piston=0.0001,
                                            direction=direction)
        system.integrator.run(20)
        box_l_rel = np.copy(system.box_l) / ref_box_l
        box_l_rel_ref = np.roll([np.max(box_l_rel), 1., 1.], n)
        np.testing.assert_allclose(box_l_rel, box_l_rel_ref, atol=1e-10)
        self.assertGreater(np.max(box_l_rel), 2)