You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A quick test to see if two molecules are equivalent:
importnumpyasnpfromscm.plamsimportMoleculemol1=Molecule(...)
mol2=Molecule(...)
def_get_atnum(mol: Molecule) ->np.ndarray:
iterator= (at.atnumforatinmol)
returnnp.fromiter(iterator, int, count=len(mol))
# check if the coords are the samenp.testing.assert_allclose(mol1, mol2)
# check if atomic symbols/numbers are the samenp.testing.assert_array_equal(_get_atnum(mol1), _get_atnum(mol2))
# Check if the bonds are the samenp.testing.assert_allclose(mol1.bond_matrix(), mol2.bond_matrix())
There are a number of examples of pre-existing tests already in CAT (ref).
The text was updated successfully, but these errors were encountered: