Closed LarsSchaaf closed 2 years ago
We've often talked about this, and in fact even considered providing a learnable transform. Do you need this for v0.8 or for the development branch?
v0.8
ok, so the functionality you need is that instead of
Rn( x(rij) )
you want
Rn( x(rij, zi, zj) )
correct?
v0.8 makes this a more difficult proposition, but I will try
Yes that's exactly what he needs!
ok, and maybe prototype implementations along the lines of
x(rij, zi, zj) = (1 + r0[zi, zj]) / (1 + r)^p[zi, zj]
x(rij, zi, zj) = exp( - lambda[zi, zj] * r / r0[zi, zj] )
There is just one caveat with all this, in v0.8, I can't easily create multiple Rn bases for each (zi, zj) component so I'll need to guarantee that all (zi, zj) pairs give transforms that map to the same domain. (I'm mostly recording this for myself, no need to engage with it ...)
cf PR #79
I was wondering about the possibility of having atom specific cutoffs. If I understand it correctly, our basis needs to be orthogonal after we have transformed the radial basis to our new domain [-1,1]. Setting atom specific cutoffs or also transforms, would then mean that the basis isn’t orthogonal in the untransformed space, but is that a problem? No right? So, as long as we are always mapping between [-1,1], having different cutoffs for different species shouldn’t be a problem?
The inner cutoff could then be set to a percentage (~90%) of the sum of covalent bond radii for a specific atom pair. For a system involving HH and MgMg, this can range from 0.56A to 2.58A. A variable inner cutoff would also mean that the current functional form (PolyTransform) of the radial transform would be more applicable. Currently with just altering r0, the derivative of the transform is still a maximum at the inner cutoff and a lot of the domain will never be explored for large covalent bond radii.
ok - so the proposal is to allow individual cutoffs for each (zi, zj) pair, then always map the [rin, rout]
domain to [-1, 1]
where the orthogonality is then enforced. This makes perfect sense to me but I'm a bit cautious about how easy it will be. I will need to take a careful look at the code.
Exactly
I realised, as I was trying to explain it to Lars, that I never understood when you said before that inner cutoffs can’t be element dependent.
... hm, looks doable ... maybe even today. You never know, but I'll try.
Would this be ok:
transforms = Dict(
(:Fe, :C) => PolyTransform(2, (rnn(:Fe)+rnn(:C)) / 2),
(:C, :Al) => PolyTransform(2, (rnn(:Al)+rnn(:C)) / 2),
(:Fe, :Al) => PolyTransform(2, (rnn(:Al)+rnn(:Fe)) / 2),
(:Fe, :Fe) => PolyTransform(2, rnn(:Fe)),
(:Al, :Al) => PolyTransform(2, rnn(:Al)),
(:C, :C) => PolyTransform(2, rnn(:C)),
(:Al, :Fe) => PolyTransform(2, (rnn(:Al)+rnn(:Fe)) / 2 + 1)
)
cutoffs = Dict(
(:Fe, :C) => (1.5, 5.0),
(:C, :Al) => (0.7, 6.0),
(:Fe, :Al) => (2.2, 4.5),
(:Fe, :Fe) => (2.0, 5.0),
(:Al, :Al) => (2.0, 5.0),
(:C, :C) => (1.5, 5.2),
(:Al, :Fe) => (1.5, 5.0)
)
trans = multitransform(transforms, cutoffs)
Why the “+1”?
just to test some random transformation parameters. I'm only asking whether this is ok as a mechanism to supply different cutoffs for different species.
This interface looks very neat to me.
please see updates PR
will close this since it is now all working in PR #79 ; we have all discussion there now, but can of course re-open if needed.
I would like to be able to adapt the radial basis depending on both atomic species of the atoms involved. More specifically, I would like to be able to set the radial transform (r0) based on the pair of involved elements.
Why does this make sense? Why is this important?