23 lines
650 B
Python
23 lines
650 B
Python
"""
|
||
Example: H2 molecule with plane-wave LDA-DFT (GTH pseudopotential).
|
||
|
||
Uses ecut=12 Ha for a fast demo. Increase ecut for production.
|
||
Expected total energy: ~-0.66 Ha (absolute value depends on ecut via G=0 reference).
|
||
Binding energy relative to 2×H atoms is independent of this constant.
|
||
"""
|
||
|
||
from deepchem_dft import Molecule, Cell, run_scf
|
||
|
||
mol = Molecule.from_xyz("""
|
||
H 0.0 0.0 0.0
|
||
H 0.0 0.0 0.741
|
||
""", unit='angstrom')
|
||
|
||
print(mol)
|
||
print(f"Nuclear repulsion: {mol.nuclear_repulsion:.6f} Ha\n")
|
||
|
||
cell, offset = Cell.from_molecule(mol, vacuum=5.0, ecut=12.0)
|
||
print(cell)
|
||
|
||
result = run_scf(cell, mol, offset=offset, tol=1e-5, verbose=True)
|