def test_guess_types(self): out = guessers.guess_types(['MG2+', 'C12']) assert isinstance(out, np.ndarray) assert_equal(out, np.array(['MG', 'C'], dtype=object))
def test_guess_bonds_adk(): u = mda.Universe(datafiles.PSF, datafiles.DCD) u.atoms.types = guessers.guess_types(u.atoms.names) bonds = guessers.guess_bonds(u.atoms, u.atoms.positions) assert_equal(np.sort(u.bonds.indices, axis=0), np.sort(bonds, axis=0))
def test_guess_bonds_peptide(): u = mda.Universe(datafiles.PSF_NAMD, datafiles.PDB_NAMD) u.atoms.types = guessers.guess_types(u.atoms.names) bonds = bond_sort(guessers.guess_bonds(u.atoms, u.atoms.positions)) assert_equal(np.sort(u.bonds.indices, axis=0), np.sort(bonds, axis=0))
def test_guess_types(self): out = guessers.guess_types(['MG2+', 'C12']) assert isinstance(out, np.ndarray) assert_equal(out, np.array(['MG', 'C'], dtype=object))