potential format #290
-
I use version 0.6.11 because it is compatible with AtomsBase v0.5 Reading the potential from json file can be done in two formats (new_format=true or new_format=false) For AtomsCalculators.potential_energy(system,potential) potential is required in new format whereas for ACEpotentials.atom_energy(potential, z0) potential is required in old format. Is planned to make this unique ? In order to get the bond energy of a single atom on the surface one needs both configurations with and without atom and |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
I don't really want to develop 0.6 anymore, but this sounds potentially like a bug that has a very quick fix. Can you produce a self-contained script that shows this problem please? |
Beta Was this translation helpful? Give feedback.
-
The feature you are asking is available with the new format aswell, but not documented. You can call e.g. folowing to access it julia> using AtomsCalculators, ACEpotentials
julia> fname_ace = joinpath(pkgdir(ACEmd), "data", "TiAl.json")
"/home/teemu/.julia/packages/ACEmd/nuHhp/data/TiAl.json"
julia> pot = ACEpotentials.load_potential(fname_ace; new_format=true)
ACE potential consisting of 3 subpotentials
julia> pot.potentials[1]
OneBody{Float64}(Dict(:Al => -105.5954, :Ti => -1586.0195))
julia> pot_onebody = ACEpotential( [pot.potentials[1]] )
ACE potential consisting of 1 subpotentials
julia> Al = isolated_system( [:Al => [0, 0, 1.]u"bohr"] )
FlexibleSystem(Al, periodicity = FFF):
Atom(Al, [ 0, 0, 1]u"a₀")
julia> AtomsCalculators.potential_energy(Al, pot_onebody)
-105.5954 eV Here is a little bit background on what is going behind the scenesVersion v0.6 has two versions of the potentials the old based JuLIP and newer ACEmd based one that you load when you give the parameter ACEmd was made as project to integrate with AtomsBase and it later lead to a development of AtomsCalculators. This was addded on top of the JuLIP based ACEpotentials to v0.6 series. The documentation for ACEpotentials stayed mostly on JuLIP version thus e.g. this is missing from it. The development then proceeded to the new v0.8 and the old v0.6 was let to be as a legacy version. But as v0.8 is AtomsBase v0.4 and does not work currently you have to use the old v0.6 series to work. |
Beta Was this translation helpful? Give feedback.
-
Hm - rereading the original request, I don't actually see an issue with the current implementation. You just have to create three systems.
Then the energy difference you are after is
and you can substitute |
Beta Was this translation helpful? Give feedback.
-
Indeed, it was more a question on the philosophy. I will use this strategy in my KMC tool |
Beta Was this translation helpful? Give feedback.
Hm - rereading the original request, I don't actually see an issue with the current implementation. You just have to create three systems.
Then the energy difference you are after is
and you can substitute
energy
for eitherAtomsCalculators.potential_energy
or forJuLIP.energy
.