def test_attributes(): coords = [np.random.rand(10, 3) for i in range(10)] t = np.arange(0, 10, 0.1) traj = Trajectory(coords, t) system = System.from_arrays(r_array=coords[0]) system.update(traj.at(1)) npeq_(system.r_array, coords[1])
def test_atomic_weight(): feq_(atomic_weight('H'), 1.00794) npeq_(atomic_weight(['O', 'H', 'H']), [15.9994, 1.00794, 1.00794])
def test_vdw_radius(): feq_(vdw_radius('H'), 0.11) npeq_(vdw_radius(['O', 'H', 'H']), [0.152, 0.11, 0.11])
def test_init(): coords = [np.random.rand(10, 3) for i in range(10)] t = np.arange(0, 10, 0.1) traj = Trajectory(coords, t) npeq_(traj.at(1)["coords"], coords[1])