pub fn tail_virial(&self) -> Matrix3 {
        if self.tail {
            let tensor = Matrix3::one() / 3.0;
            return self.potential.tail_virial(self.cutoff) * tensor;
        } else {
            return Matrix3::zero();
        }
    }
/// Get the tail correction to the virial for this pair interaction
///
/// # Examples
///
/// ```
/// use lumol_core::energy::PairInteraction;
/// use lumol_core::energy::LennardJones;
/// # use lumol_core::types::Matrix3;
///
/// let potential = Box::new(LennardJones{sigma: 0.5, epsilon: 4.2});
/// let mut interaction = PairInteraction::new(potential, 2.0);
/// interaction.enable_tail_corrections();
///
/// let w = -0.02187143961588542;
/// let virial = Matrix3::new([
///     [w, 0.0, 0.0],
///     [0.0, w, 0.0],
///     [0.0, 0.0, w],
/// ]);
///
/// assert_eq!(interaction.tail_virial(), virial);
/// ```
Get the tail correction to the virial for this pair interaction
Get the tail correction to the virial for this pair interaction
pub fn tail_virial(&self) -> Matrix3 {
        if self.tail {
            let tensor = Matrix3::one() / 3.0;
            return self.potential.tail_virial(self.cutoff) * tensor;
        } else {
            return Matrix3::zero();
        }
    }
pub fn tail_virial ( & self ) -> Matrix3 { if self . tail { let tensor = Matrix3 :: one ( ) / 3.0 ; return self . potential . tail_virial ( self . cutoff ) * tensor ; } else { return Matrix3 :: zero ( ) ; } }
Get the tail correction to the virial for this pair interaction
Get the tail correction to the virial for this pair interaction
&self
examples
```
use lumol_core::energy::PairInteraction;
use lumol_core::energy::LennardJones.
` ` ` use lumol_core :: energy :: PairInteraction ; use lumol_core :: energy :: LennardJones .
use lumol_core::types::matrix3;
let potential = Box::new(LennardJones{sigma: 0.5, epsilon: 4.2});
let mut interaction = PairInteraction::new(potential, 2.0);
interaction.enable_tail_corrections().



assert_eq!(interaction.tail_virial(), virial);
```
let potential = Box :: new ( LennardJones { sigma : 0 . 5 epsilon : 4 . 2 } ) ; let mut interaction = PairInteraction :: new ( potential 2 . 0 ) ; interaction . enable_tail_corrections () . assert_eq! ( interaction . tail_virial () virial ) ; ` ` `