Author Topic: Including additional potential classes into the tremolox potential set  (Read 2134 times)

0 Members and 1 Guest are viewing this topic.

Offline matsiv

  • Regular QuantumATK user
  • **
  • Posts: 8
  • Country: it
  • Reputation: 0
    • View Profile
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.

Offline mlee

  • QuantumATK Guru
  • ****
  • Posts: 173
  • Country: dk
  • Reputation: 6
    • View Profile
Have you tried to add the new potential  components in potential editor?

Offline BradWells

  • QuantumATK Staff
  • Regular QuantumATK user
  • *****
  • Posts: 10
  • Country: dk
  • Reputation: 0
    • View Profile
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
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.
 

Offline matsiv

  • Regular QuantumATK user
  • **
  • Posts: 8
  • Country: it
  • Reputation: 0
    • View Profile
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).

Offline BradWells

  • QuantumATK Staff
  • Regular QuantumATK user
  • *****
  • Posts: 10
  • Country: dk
  • Reputation: 0
    • View Profile
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
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.

Offline matsiv

  • Regular QuantumATK user
  • **
  • Posts: 8
  • Country: it
  • Reputation: 0
    • View Profile
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