Skip to content

Redesign methods and structures for multi-element and IAP combinations #14

@dallasfoster

Description

@dallasfoster

Some of the more realistic use cases in the CESMIX universe are systems with multiple atom types (i.e., HfO2, HfB, Hydrogen/Palladium cluster). In such systems there are often 2 modeling choices that occur: (1) the forces between atoms is modeled as a combination of potentials (i.e., an empirical potential like ZBL and a basis potential like SNAP) and (2) the function that is used to calculate the force between two atoms (atom_i, atom_j) might depend on the elements of atom_i and atom_j (i.e., in the GaN example Ga-Ga, Ga-N, and N-N are all modeled differently).

In the hope of providing flexibility and ease of use for users of InteratomicPotentials.jl, I think there should be some mechanism available to easily describe the modeling choices of the system. An example could be something like what is implemented in Turing.jl:

## GaN <: CompiledModel
@model GaN(q_Ga, q_N, rcut_Ga_Ga, rcut_N_N, rcut_Ga_N, ε_Ga, σ_Ga, ε_N, σ_N, a, ρ) = begin
 # Define Galium-Galium Interaction
   :Ga ~ :Ga -> Coulomb(q_Ga, q_Ga, e0, rcut_Ga_Ga) + LennardJones(ε_Ga, σ_Ga)

 # Define Nickel-Nickel Interaction
   :N ~ :N -> Coulomb(q_N, q_N, e0, rcut_N_N) + LennardJones(ε_N, σ_N)


 # Define Galium-Nickel Interaction
  :Ga ~ :N -> Coulomb(q_Ga, q_N, e0, rcut_Ga_N) + BornMayer(a, ρ)
end 

With such a model, you could compute the energy and force like so:

potential_energy(A, GaN) # A <: AbstractSystem
force(A, GaN) 

There are some challenges with this approach. First, I have no idea how to implement such a thing in Julia (help?). Second, if a CompiledModel contained a BasisPotential that needed to be fitted (i.e., SNAP). It would be helpful to extract the descriptors associated with that potential. Normally you would invoke the code

descriptors = evaluate_basis(A, snap)

But this could become more complicated take the following example:

## Suppose we are modeling a cluster system with Hydrogen and Palladium. Suppose we want Hydrogen-Hydrogen,  
## Hydrogen-Palladium, and Palladium-Palladium atoms, to interact with the same SNAP potential but we also want
## Hydrogen-Hydrogen atoms to have an extra Bessel potential.
@model Cluster(β_SNAP, β_Bessel, SNAPParams, BesselParams) = begin
 # Define Hydrogen and Palladium Interaction
   :P ~ :P -> SNAP(β_SNAP, SNAPParams)
   :P ~ :H -> SNAP(β_SNAP, SNAPParams)
  :H ~ :H -> SNAP(β_SNAP, SNAPParams) + Bessel(β_Bessel, BesselParams)
end 

This model only needs the single SNAP potential (not three separate SNAP potentials) and single Bessel potential. If I call the descriptors for this model, I want to make sure that they are separated into the SNAP descriptors and Bessel descriptors. Furthermore, for solving linear systems (those generated by SNAP, ACE, etc.), it is important to separate out the so-called 'reference' energies and forces provided by the empirical potentials from the contributions of the BasisPotentials.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions