10
1
mirror of https://github.com/pfloos/quack synced 2024-10-20 14:58:15 +02:00

saving (found BUG in RGWC)

This commit is contained in:
Abdallah Ammar 2024-08-29 09:45:30 +02:00
parent 1a195f90cc
commit 0262e73353
5 changed files with 105 additions and 24 deletions

0
tests/bulk_set.py Normal file
View File

View File

@ -1,42 +1,25 @@
import sqlite3
from molecule import Molecule
from molecule import save_molecules_to_json, load_molecules_from_json
from molecule import create_database, add_molecule_to_db
from swift_set import swiftset
molecules = [
Molecule(
name="H2O",
multiplicity=1,
geometry=[
{"element": "O", "x": 0.000000, "y": 0.000000, "z": 0.117790},
{"element": "H", "x": 0.000000, "y": 0.755453, "z": -0.471161},
{"element": "H", "x": 0.000000, "y": -0.755453, "z": -0.471161}
],
energies={
"RHF": {
"cc-pvdz": -76.0267058009,
"cc-pvtz": -76.0570239304,
"cc-pvqz": -76.0646816616
},
}
),
]
# Save molecules to JSON
save_molecules_to_json(molecules, 'molecules.json')
save_molecules_to_json(swiftset, 'swiftset.json')
# Load molecules from JSON
loaded_molecules = load_molecules_from_json('molecules.json')
loaded_molecules = load_molecules_from_json('swiftset.json')
print(loaded_molecules)
# Create a database and add molecules
db_name = 'molecules.db'
db_name = 'swiftset.db'
create_database(db_name)
for molecule in molecules:
for molecule in swiftset:
add_molecule_to_db(db_name, molecule)

0
tests/equi_set.py Normal file
View File

22
tests/methods.test Normal file
View File

@ -0,0 +1,22 @@
# RHF UHF GHF ROHF
T F F F
# MP2 MP3
T T
# CCD pCCD DCD CCSD CCSD(T)
T T T T F
# drCCD rCCD crCCD lCCD
T T T T
# CIS CIS(D) CID CISD FCI
T F F F F
# phRPA phRPAx crRPA ppRPA
T T T T
# G0F2 evGF2 qsGF2 ufGF2 G0F3 evGF3
T T F F F F
# G0W0 evGW qsGW SRG-qsGW ufG0W0 ufGW
T T F F F F
# G0T0pp evGTpp qsGTpp ufG0T0pp
T T F F
# G0T0eh evGTeh qsGTeh
F F F
# Rtest Utest Gtest
T F F

76
tests/swift_set.py Normal file
View File

@ -0,0 +1,76 @@
from molecule import Molecule
He = Molecule(
name="He",
multiplicity=1,
geometry=[
{"element": "He", "x": 0.0, "y": 0.0, "z": 0.0}
],
properties={
"6-31g": {
"RHF energy": -2.855160426884076,
"RHF HOMO energy": -0.914126628614305,
"RHF LUMO energy": 1.399859335225087,
"RHF dipole moment": 0.000000000000000,
"RMP2 correlation energy": -0.011200122910187,
"CCD correlation energy": -0.014985063408247,
"DCD correlation energy": -0.014985062907429,
"CCSD correlation energy": -0.015001711549550,
"drCCD correlation energy": -0.018845374502248,
"rCCD correlation energy": -0.016836324636164,
"crCCD correlation energy": 0.008524677369855,
"lCCD correlation energy": -0.008082420815100,
"pCCD correlation energy": -0.014985062519068,
"RCIS singlet excitation energy": 1.911193619935257,
"RCIS triplet excitation energy": 1.455852629402236,
"phRRPA correlation energy": -0.018845374129105,
"phRRPAx correlation energy": -0.015760565121283,
"crRRPA correlation energy": -0.008868581132405,
"ppRRPA correlation energy": -0.008082420815100,
"RG0F2 correlation energy": -0.011438430540374,
"RG0F2 HOMO energy": -0.882696116247871,
"RG0F2 LUMO energy": 1.383080391811630,
"evRGF2 correlation energy": -0.011448483158486,
"evRGF2 HOMO energy": -0.881327878713477,
"evRGF2 LUMO energy": 1.382458968133448,
"RG0W0 correlation energy": -0.019314094399756,
"RG0W0 HOMO energy": -0.870533880190454,
"RG0W0 LUMO energy": 1.377171287010956,
"evRGW correlation energy": -0.019335511771724,
"evRGW HOMO energy": -0.868460640957913,
"evRGW LUMO energy": 1.376287581471769,
"RG0T0pp correlation energy": -0.008082420815100,
"RG0T0pp HOMO energy": -0.914126628614305,
"RG0T0pp LUMO energy": 1.399859335225087,
"evRGTpp correlation energy": -0.008082420815100,
"evRGTpp HOMO energy": -0.914126628614305,
"evRGTpp LUMO energy": 1.399859335225087
}
}
)
# ---
H2O = Molecule(
name="H2O",
multiplicity=1,
geometry=[
{"element": "O", "x": 0.0000, "y": 0.0000, "z": 0.0000},
{"element": "H", "x": 0.7571, "y": 0.0000, "z": 0.5861},
{"element": "H", "x": -0.7571, "y": 0.0000, "z": 0.5861}
],
properties={
"cc-pvdz": {
}
)
# ---
SwiftSet = [He, H2O]