def test_center_of_mass(methane_molecule): symbols, coordinates = methane_molecule center_of_mass = molecool.calculate_center_of_mass(symbols, coordinates) expected_center = np.array([1,1,1]) assert np.array_equal(center_of_mass, expected_center)
def test_center_of_mass(): symbols = np.array(['C', 'H', 'H', 'H', 'H']) coordinates = np.array([[1,1,1], [2.4,1,1], [-0.4, 1, 1], [1, 1, 2.4], [1, 1, -0.4]]) center_of_mass = molecool.calculate_center_of_mass(symbols, coordinates) expected_center = np.array([1,1,1]) assert np.array_equal(center_of_mass, expected_center)
def test_center_of_mass(methane_molecule): # symbols = np.array(['C', 'H', 'H', 'H', 'H']) # coordinates = np.array([[1,1,1], [2.4,1,1], [-0.4, 1, 1], [1, 1, 2.4], [1, 1, -0.4]]) symbols, coordinates = methane_molecule center_of_mass = molecool.calculate_center_of_mass(symbols, coordinates) expected_center = np.array([1, 1, 1]) assert np.array_equal(expected_center, center_of_mass)