https://github.com/felipelewyee/donof.jl
A Julia package for Natural Orbital Functional Calculations
https://github.com/felipelewyee/donof.jl
chemistry julia natural-orbital-functional quantum-chemistry
Last synced: 10 months ago
JSON representation
A Julia package for Natural Orbital Functional Calculations
- Host: GitHub
- URL: https://github.com/felipelewyee/donof.jl
- Owner: felipelewyee
- License: other
- Created: 2021-06-05T01:45:18.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-09-02T12:58:36.000Z (10 months ago)
- Last Synced: 2025-09-03T20:02:59.694Z (10 months ago)
- Topics: chemistry, julia, natural-orbital-functional, quantum-chemistry
- Language: Julia
- Homepage:
- Size: 2.72 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 
This is a Julia version of the [DoNOF](https://github.com/DoNOF/DoNOFsw/) (Donostia Natural Orbital Functionals) software written by Prof. Mario Piris, with the intention of take advantage of the wonderful capabilities of Julia language.
## 🌟 Installation
Open a julia prompt, enter to the Pkg REPL by pressing ], and simply add DoNOF:
~~~julia
add DoNOF
~~~
## 🎯 Example
- Put the following directly on the Julia prompt to run a calculation:
~~~julia
using DoNOF
mol = """
0 1
O 0.0000 0.000 0.121
H 0.0000 0.751 -0.485
H 0.0000 -0.751 -0.485
"""
bset,p = DoNOF.molecule(mol,"cc-pvdz")
p.ipnof = 8
DoNOF.energy(bset,p)
~~~
- You can also save the input in a file (e.g. example.jl) and run it directly on the command line:
~~~bash
julia example.jl > example.out
~~~
## ⚙️ Useful Options
> [!TIP]
> **Available functionals**
> - p.ipnof = 9 (GNOFm)
> - p.ipnof = 8 (GNOF)
> - p.ipnof = 7 (PNOF7)
> - p.ipnof = 7 + p.ista=1 (PNOF7s)
> - p.ipnof = 5 (PNOF5)
> - p.ipnof = 4 (PNOF4)
> [!NOTE]
> **Available optimizers**
> - For Orbital Optimization:
> - p.orb_method = "ADAM"
> - p.orb_method = "ADABelief"
> - p.orb_method = "YOGI"
> - p.orb_method = "Demon"
> - For Occupation Optimization:
> - p.occ_method = "Softmax"
> - p.occ_method = "Trigonometric"
You can give title to the jobs, and the orbitals and occupations will be saved on a jld2 file with that name:
- p.title = "molecule_name"
Orbitals are saved in a FCHK file that you can open in your prefered software (e.g. Avogadro2, IQmol)
## 😎 Tips
- You should have [Julia installed](https://julialang.org/downloads)
- Remember to configure the number of threads for parallelism, for example:
~~~
export JULIA_NUM_THREADS=12
~~~
- To use GPUs, just add CUDA, cuTENSOR and KernelAbstractions:
~~~julia
using CUDA, cuTENSOR, KernelAbstractions, DoNOF
mol = """
0 1
O 0.0000 0.000 0.121
H 0.0000 0.751 -0.485
H 0.0000 -0.751 -0.485
"""
bset,p = DoNOF.molecule(mol,"cc-pvdz")
p.ipnof = 8
DoNOF.energy(bset,p)
~~~