1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! # Dihedral Torsion Potentials
//!
//! Four-body potentials for dihedral angle rotation.
//!
//! ## Included Potentials
//!
//! | Potential | Description | Common Use |
//! |-----------|-------------|------------|
//! | [`Cos`] | Periodic cosine | AMBER, DREIDING |
//! | [`Opls`] | Fourier series | OPLS |
//! | [`Rb`] | Ryckaert-Bellemans | GROMOS |
//! | [`Harm`] | Harmonic | Restraints |
//!
//! ## Dihedral Convention
//!
//! For atoms i-j-k-l:
//! - phi is the angle between planes (i,j,k) and (j,k,l)
//! - phi = 0 when all four atoms are in the same plane (cis configuration)
//! - phi = 180° for trans configuration
//!
//! The sign convention follows the IUPAC definition:
//! - Looking along j->k, phi is positive for clockwise rotation of l relative to i
//!
//! ## Example
//!
//! ```
//! use potentials::torsion::{Cos, Potential4};
//!
//! // Ethane-like torsion: barrier = 2.5 kcal/mol, 3-fold symmetry
//! let torsion = Cos::new(2.5, 3, 0.0);
//!
//! let phi = std::f64::consts::PI / 3.0; // 60 degrees
//! let (cos_phi, sin_phi) = (phi.cos(), phi.sin());
//! let energy = torsion.energy(cos_phi, sin_phi);
//! ```
pub use Cos;
pub use Harm;
pub use Opls;
pub use Rb;
// Re-export base trait for convenience
pub use cratePotential4;