Usage
Package has two modes default registry and custom registries.
Using default registry
Default registry can be loaded with
using PotentialDB
d = defaultregistry()
Potential registry 8 potentials
You can list potentials stored in the default registry with listpotentials
-command
listpotentials(d)
[key] => Description
[3] => cis-formic acid - argon potential. Max 5000 cm⁻¹
[4] => trans-formic acid - argon potential. Max 5000 cm⁻¹
[1] => cis-formic acid - argon potential. Max 20000 cm⁻¹
[5] => benzene - argon potential. Max 5000 cm⁻¹
[2] => trans-formic acid - argon potential. Max 20000 cm⁻¹
[6] => benzene - neon potential. Max 5000 cm⁻¹
[7] => glycolic acid - argon potential. Max 20000 cm⁻¹
[8] => trans-formic acid - argon potential. Max 5000 cm⁻¹
To list more details of the selected potential, you can call it with its key
d["1"]
Dict{String, Any} with 8 entries:
"CAS" => ["64-18-6", "7440-37-1"]
"method" => "CCSD(T)-F12/RI"
"hash" => "5de11d919d19a921fa246219c32566bfdc99a1ddfb46b6cb6abaab944cb…
"keywords" => ["formic acid", "argon"]
"file" => "potential-1.jld2"
"basis" => "cc-pVDZ-F12 cc-pVDZ-F12-CABS cc-pVTZ/C"
"authors" => ["Teemu Järvinen"]
"description" => "cis-formic acid - argon potential. Max 20000 cm⁻¹"
To load a wanted potential, call with loadpotential
and key
p=loadpotential(d,"1")
Dict{String, Any} with 6 entries:
"Method" => "CCSD(T)-F12/RI"
"cluster2" => Cluster{AtomOnlySymbol} of 1 atoms
"Energy" => [0.0699679 0.0829061 … 0.0811201 0.0828071; 0.0221226 0.0240231…
"Points" => Cluster{AtomOnlySymbol}[Cluster{AtomOnlySymbol} of 6 atoms Clus…
"cluster1" => Cluster{AtomOnlySymbol} of 5 atoms
"Basis" => "cc-pVDZ-F12 cc-pVDZ-F12-CABS cc-pVTZ/C TIGHTSCF"
AtomsBase output
To load data in AtomsBase format use
data = load_data(d, "1")
Dict{String, Matrix{FlexibleSystem{3, Atom, Quantity{Float64, 𝐋, Unitful.FreeUnits{(a₀,), 𝐋, nothing}}}}} with 3 entries:
"cluster2" => [FlexibleSystem(Ar, infinite) FlexibleSystem(Ar, infinite) … Fl…
"Points" => [FlexibleSystem(ArCH₂O₂, infinite) FlexibleSystem(ArCH₂O₂, infi…
"cluster1" => [FlexibleSystem(CH₂O₂, infinite) FlexibleSystem(CH₂O₂, infinite…
Custom registries
Registries are defined by a TOML-file that holds information on where the file holding potential energy data is saved and some details on the potential itself. Example default registry has entry:
[1]
CAS = ["64-18-6", "7440-37-1"]
method = "CCSD(T)-F12/RI"
hash = "23284650a0739cbda33e82f4f16ca962e833fa6c320c492525033e492d1e2b87"
keywords = ["formic acid", "argon"]
file = "potential-1.jld"
basis = "cc-pVDZ-F12 cc-pVDZ-F12-CABS cc-pVTZ/C"
authors = ["Teemu Järvinen"]
description = "cis-formic acid - argon potential. Max 20000 cm⁻¹"
Some of keywords are mandatory, some are not. Also there can be as many keywords as you want to add.
List of mandatory keywords
- authors - Identify persons who made the potential.
- basis - Basis functions used in calculaton.
- CAS - CAS numbers of molecules in the potential. Needed for identification.
- description - Short desciption of potential.
- file - location of potentialfile relative to location registry file.
- keywords - Used to do search on potentials.
- method - Method used to calculate potential.
Additionally hash
-keyword is optional. It contains SHA256 sum of potential file and, if present, is used to check integrity of potential upon loading.
To load custom potential registry, use PotentialRegistry("Registry.toml")
. If file "Registry.toml"
exists, this call loads it and checks, if it has correct form, if not it will throw an error. If file does not exist, it creates a new registry.
r = PotentialRegistry("example.toml")
Potential registry 0 potentials
You can use addpotential!
-function to add potentials to this file. As and example, lets add a potential from default registry.
Lets first load potential from default registry
d = defaultregistry()
p = loadpotential(d, "2")
Dict{String, Any} with 6 entries:
"Method" => "CCSD(T)-F12/RI"
"cluster2" => Cluster{AtomOnlySymbol} of 1 atoms
"Energy" => [0.0828836 0.0901049 … 0.0792415 0.0679845; 0.0260046 0.0263087…
"Points" => Cluster{AtomOnlySymbol}[Cluster{AtomOnlySymbol} of 6 atoms Clus…
"cluster1" => Cluster{AtomOnlySymbol} of 5 atoms
"Basis" => "cc-pVDZ-F12 cc-pVDZ-F12-CABS cc-pVTZ/C TIGHTSCF"
To add potential, you must create a Dict
-that holds mandatory keywords needed for a registry entry. In the case of this example, we can load this data from the default registry.
k = d["2"]
Dict{String, Any} with 8 entries:
"CAS" => ["64-18-6", "7440-37-1"]
"method" => "CCSD(T)-F12/RI"
"hash" => "cf44a3c66a2aad0dd2022569267cf47f44fdeafd5c23f51ca6b2f03eb20…
"keywords" => ["formic acid", "argon"]
"file" => "potential-2.jld2"
"basis" => "cc-pVDZ-F12 cc-pVDZ-F12-CABS cc-pVTZ/C"
"authors" => ["Teemu Järvinen"]
"description" => "trans-formic acid - argon potential. Max 20000 cm⁻¹"
We can now add potential to our example registry
addpotential!(r, p, k)
Potential registry 1 potentials
New potential was added and registry file was saved. To confirm, that we added a new potential correctly, we can do:
julia> rc = PotentialRegistry("example.toml")
Potential registry 1 potentials
julia> listpotentials(rc)
[key] => Description [1] => trans-formic acid - argon potential. Max 20000 cm⁻¹
julia> rc["1"]
Dict{String, Any} with 9 entries: "CAS" => ["64-18-6", "7440-37-1"] "method" => "CCSD(T)-F12/RI" "number of points" => 640 "hash" => "2237efbf038102f5698acbc8c7bff33d5b1cb9f2800f2dfb9e7c7b… "keywords" => ["formic acid", "argon"] "file" => "potential-2.jld2" "basis" => "cc-pVDZ-F12 cc-pVDZ-F12-CABS cc-pVTZ/C" "authors" => ["Teemu Järvinen"] "description" => "trans-formic acid - argon potential. Max 20000 cm⁻¹"
julia> loadpotential(rc, "1")
Dict{String, Any} with 6 entries: "Method" => "CCSD(T)-F12/RI" "cluster2" => Cluster{AtomOnlySymbol} of 1 atoms "Energy" => [0.0828836 0.0901049 … 0.0792415 0.0679845; 0.0260046 0.0263087… "Points" => Cluster{AtomOnlySymbol}[Cluster{AtomOnlySymbol} of 6 atoms Clus… "cluster1" => Cluster{AtomOnlySymbol} of 5 atoms "Basis" => "cc-pVDZ-F12 cc-pVDZ-F12-CABS cc-pVTZ/C TIGHTSCF"
Add potentials to default registry
Default registry is just standard registy file located in data-directory of the package. While you can add entries there by had, it is recommended to use addpotential!
-function. You can then submit a pull request to PotentialDB.jl, to have your potential to added for everyone's use.