QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: matsiv on July 26, 2021, 12:57

Title: Including additional potential classes into the tremolox potential set
Post by: matsiv on July 26, 2021, 12:57
Hi,
is it possible to add new classes to the tremolox potential set as needed? I'm seeing that some dihedral interactions I need (cosine power series and fourier) are missing.
Title: Re: Including additional potential classes into the tremolox potential set
Post by: mlee on July 27, 2021, 10:08
Have you tried to add the new potential  components in potential editor?
Title: Re: Including additional potential classes into the tremolox potential set
Post by: BradWells on July 27, 2021, 14:17
Hi Matsiv,

Unfortunately it is not possible to add classes to TremoloX.  The clasess in Python are implemented in high-performance C++, and so it is much more complicated than just adding Python classes.

With dihedral terms, we have a Fourier series term implemented in TremoloX.  You can find the details of it here:
https://docs.quantumatk.com/manual/Types/CosineTorsionPotential/CosineTorsionPotential.html (https://docs.quantumatk.com/manual/Types/CosineTorsionPotential/CosineTorsionPotential.html)
Do you have dihedral terms that you can't expressed in that form?  Are you able to describe the potential that you are trying to implement?

Cheers,
Brad.
 
Title: Re: Including additional potential classes into the tremolox potential set
Post by: matsiv on July 27, 2021, 14:42
one term in particular is the one described in https://docs.lammps.org/dihedral_nharmonic.html, basically a series of cosine powers.
Another was a term I had derived from dft calculations which I decided to represent with a cubic spline interpolation (built in in lammps) because I couldn't find a good approximation with a fourier series (probably a problem with how I interpolated).
Title: Re: Including additional potential classes into the tremolox potential set
Post by: BradWells on July 27, 2021, 17:10
Hi Matsiv,

This is maybe not the most elegant solution, but with the power cosine series you can re-cast those into cosines of multiple angles suitable for a Fourier expansion. 
This link is to Wikipedia, but I think the formulas are correct  :)
https://en.wikipedia.org/wiki/List_of_trigonometric_identities#Power-reduction_formulae (https://en.wikipedia.org/wiki/List_of_trigonometric_identities#Power-reduction_formulae)
So if you had a list of cosine powers, you could work out the equivalent sum of multiple angle cosine functions, bearing in mind that you can use n=0 to just get a constant offset if you need one.

We unfortunately don't have a tabulated cosine potential, but I would think you should be able to reasonably close with a Fourier series.  We do have a tablulated bond and non-bond pair potential, but I think that is all.

Cheers,
Brad.
Title: Re: Including additional potential classes into the tremolox potential set
Post by: matsiv on July 28, 2021, 00:15
Yeah, I hadn't thought of that simple solution for some reason.  Though in the end it was faster to just derive the coefficient with fft since I end up with a finite series anyway