Closed drobnyjt closed 4 years ago
This is completed in the Fancy Enums branch (which is the currently open PR). The way these are going to look is the following:
interaction_potential = [
[ "KR_C", {"LENNARD_JONES_65_6"={epsilon = 1.6E-20, sigma = 1E-10}}],
[{"LENNARD_JONES_65_6"={epsilon = 1.6E-20, sigma = 1E-10}}, "KR_C"]
]
scattering_integral = [
["MENDENHALL_WELLER", {"GAUSS_MEHLER"={n_points = 10}}],
[{"GAUSS_MEHLER"={n_points = 10}}, "MENDENHALL_WELLER"]
]
root_finder = [
[{"NEWTON"={max_iterations = 100, tolerance = 1E-3}}, {"POLYNOMIAL"={complex_threshold = 1E-9}}],
[{"POLYNOMIAL"={complex_threshold = 1E-9}}, {"NEWTON"={max_iterations = 100, tolerance = 1E-3}}]
]
This example is for He-W. For He-W and W-He, the code uses a Lennard-Jones 6.5-6 potential, with sigma=1 Angstrom and epsilon=0.1eV. The LJ potential uses the polynomial rootfinder and Gauss-Mehler integration with 10 points. The matrices correspond to the following interactions:
[[He-He, He-W]
[W-He, W-W]]
So self interactions are handled using the universal Kr-C potential and He-W is handled with a 6.5-6 potential. This produces trajectories distinct from using Kr-C everywhere (this plot is He on TiO2 - Al - Si
:
Now that the CPR and polynomial root-finders are working in the cpr_rootfinder branch, the time has come to move away from universal interatomic potentials. Potentials should be specifiable on a species by species basis.
The simplest way to implement this would be the following:
Each species gets a unique integer tag
These tags correspond to indices on an interaction matrix. So for example, if the system is He-W:
The values of the interaction matrix would be integer tags that each correspond to an interaction potential. Additional parameters could be vectors in a same-shaped matrix (e.g., sigma and epsilon for Lennard-Jones).