Пример #1
0
    def test_remove_atoms(self):
        # This will remove the first and last molecules
        mols = self._make_molecules()
        system = System(mols)
        system.remove_atoms([0, 1, 11])

        assert_eqbonds(system.bonds, [[0, 1], [0, 2], [3, 4], [3, 5]])
        assert_npequal(system.type_array, np.array(["O", "H", "H", "O", "H", "H"], dtype="object"))
Пример #2
0
    def test_remove_atoms(self):
        # This will remove the first and last molecules
        mols = self._make_molecules()
        system = System(mols)
        system.remove_atoms([0, 1, 11])

        assert_eqbonds(system.bonds, [[0, 1], [0, 2], [3, 4], [3, 5]])
        assert_npequal(
            system.type_array,
            np.array(['O', 'H', 'H', 'O', 'H', 'H'], dtype='object'))