def test_same_mol2(self): mol1 = gto.M(atom='H 0.0052917700 0.0000000000 -0.8746076326; F 0.0000000000 0.0000000000 0.0464013747') mol2 = gto.M(atom='H 0.0000000000 0.0000000000 -0.8746076326; F 0.0052917700 0.0000000000 0.0464013747') self.assertTrue(gto.same_mol(mol1, mol2)) mol1 = gto.M(atom='H 0.0052917700 0.0000000000 -0.8693158626; F 0.0000000000 0.0000000000 0.0464013747') mol2 = gto.M(atom='H 0.0000000000 0.0052917700 -0.8693158626; F 0.0000000000 0.0000000000 0.0464013747') mol3 = gto.M(atom='H 0.0000000000 0.0000000000 -0.8693158626; F 0.0052917700 0.0000000000 0.0464013747') mol4 = gto.M(atom='H -0.0052917700 0.0000000000 -0.8746076326; F 0.0000000000 0.0000000000 0.0411096047') mols = (mol1, mol2, mol3, mol4) for i,mi in enumerate(mols): for j in range(i): self.assertTrue(gto.same_mol(mols[i], mols[j])) mol1 = gto.M(atom='''H 0.0000000000 0.0000000000 0.0000000000 H 0.9497795800 1.3265673200 0.0000000000 H 0.9444878100 -1.3265673200 0.0000000000 H1 -0.9444878100 0.0000000000 1.3265673200 H1 -0.9444878100 0.0000000000 -1.3265673200''', basis={'H':'sto3g', 'H1':'sto3g'}, charge=1) mol2 = gto.M(atom='''H 0.0000000000 0.0000000000 0.0000000000 H 0.9444878100 1.3265673200 0.0000000000 H 0.9497795800 -1.3265673200 0.0000000000 H1 -0.9444878100 0.0000000000 1.3265673200 H1 -0.9444878100 0.0000000000 -1.3265673200''', basis={'H':'sto3g', 'H1':'sto3g'}, charge=1) self.assertTrue(gto.same_mol(mol1, mol2)) self.assertEqual(len(gto.atom_types(mol1._atom)), 2) mol3 = gto.M(atom='''H 0.0000000000 0.0000000000 0.0000000000 H1 0.9497795800 1.3265673200 0.0000000000 H1 0.9444878100 -1.3265673200 0.0000000000 H1 -0.9444878100 0.0000000000 1.3265673200 H1 -0.9444878100 0.0000000000 -1.3265673200''', basis={'H':'sto3g', 'H1':'321g'}, charge=1) self.assertTrue(not gto.same_mol(mol3, mol2))
def test_same_mol2(self): mol1 = gto.M(atom='H 0.0052917700 0.0000000000 -0.8746076326; F 0.0000000000 0.0000000000 0.0464013747') mol2 = gto.M(atom='H 0.0000000000 0.0000000000 -0.8746076326; F 0.0052917700 0.0000000000 0.0464013747') self.assertTrue(gto.same_mol(mol1, mol2)) mol1 = gto.M(atom='H 0.0052917700 0.0000000000 -0.8693158626; F 0.0000000000 0.0000000000 0.0464013747') mol2 = gto.M(atom='H 0.0000000000 0.0052917700 -0.8693158626; F 0.0000000000 0.0000000000 0.0464013747') mol3 = gto.M(atom='H 0.0000000000 0.0000000000 -0.8693158626; F 0.0052917700 0.0000000000 0.0464013747') mol4 = gto.M(atom='H -0.0052917700 0.0000000000 -0.8746076326; F 0.0000000000 0.0000000000 0.0411096047') mols = (mol1, mol2, mol3, mol4) for i,mi in enumerate(mols): for j in range(i): self.assertTrue(gto.same_mol(mols[i], mols[j])) mol1 = gto.M(atom='''H 0.0000000000 0.0000000000 0.0000000000 H 0.9497795800 1.3265673200 0.0000000000 H 0.9444878100 -1.3265673200 0.0000000000 H1 -0.9444878100 0.0000000000 1.3265673200 H1 -0.9444878100 0.0000000000 -1.3265673200''', basis={'H':'sto3g', 'H1':'sto3g'}, charge=1) mol2 = gto.M(atom='''H 0.0000000000 0.0000000000 0.0000000000 H 0.9444878100 1.3265673200 0.0000000000 H 0.9497795800 -1.3265673200 0.0000000000 H1 -0.9444878100 0.0000000000 1.3265673200 H1 -0.9444878100 0.0000000000 -1.3265673200''', basis={'H':'sto3g', 'H1':'sto3g'}, charge=1) self.assertTrue(gto.same_mol(mol1, mol2)) self.assertEqual(len(gto.atom_types(mol1._atom)), 2) mol3 = gto.M(atom='''H 0.0000000000 0.0000000000 0.0000000000 H1 0.9497795800 1.3265673200 0.0000000000 H1 0.9444878100 -1.3265673200 0.0000000000 H1 -0.9444878100 0.0000000000 1.3265673200 H1 -0.9444878100 0.0000000000 -1.3265673200''', basis={'H':'sto3g', 'H1':'321g'}, charge=1) self.assertTrue(not gto.same_mol(mol3, mol2))