Sails::TorsionAngleRefiner
struct Sails::TorsionAngleRefiner
Summary
Members | Descriptions |
---|---|
| Refines torsion angles for a set of atoms using reference atoms and density information. |
| Calculates the score function for refining torsion angles based on a set of angles and the density score. |
| Refines torsion angles using a Nelder-Mead optimization algorithm. |
| The length of a linkage bond |
| Allowed angle range for alpha, beta and gamma linkage angles. |
| Allowed angle range for phi, psi and omega linkage torsions. |
| Angle mean for alpha, beta and gamma linkage angles. |
| Torsion angle mean range for phi, psi and omega linkage torsions. |
| List of pointers to all the atoms in the linkage to be refined |
| List of pointers to reference atoms in the linkage to be refined |
| Density object used for scoring to any derived density method (Xtal or EM) |
| The reference residue used for superpositons |
| Calculates the penalty factor after looking at the scoring method in the m_density object. |
| Calculates the penalty for a given angle based on its deviation from the mean angle using the penalty factor. |
Members
public inline
TorsionAngleRefiner
(std::vector< gemmi::Atom * > & atoms, std::vector< gemmi::Atom > & reference_atoms, Density & density,
SuperpositionResult
& superposition_result, double length, std::vector< double > & angle_mean, std::vector< double > & angle_range, std::vector< double > & torsion_mean, std::vector< double > & torsion_range)
Refines torsion angles for a set of atoms using reference atoms and density information.
Parameters
atoms
A reference to a vector of Atom pointers.reference_atoms
A reference to a vector of Atom objects representing the reference atoms.density
A reference to a Density object.superposition_result
A reference to a SuperpositionResult object.length
A double representing the length.angle_mean
A reference to a vector of doubles representing the mean angles.angle_range
A reference to a vector of doubles representing the angle ranges.torsion_mean
A reference to a vector of doubles representing the mean torsions.torsion_range
A reference to a vector of doubles representing the torsion ranges.
public double
score_function
(std::vector< double > & angles)
Calculates the score function for refining torsion angles based on a set of angles and the density score.
Parameters
all_angles
A reference to a vector of doubles representing the input angles.
Angles are in the order alpha beta gamma psi phi omega
Returns
The calculated score function value.
public
SuperpositionResult
refine
()
Refines torsion angles using a Nelder-Mead optimization algorithm.
Returns
A SuperpositionResult object containing the refined residue, transform, and reference residue.
private double
m_length
The length of a linkage bond
private std::vector< double >
m_angle_range
Allowed angle range for alpha, beta and gamma linkage angles.
private std::vector< double >
m_torsion_range
Allowed angle range for phi, psi and omega linkage torsions.
private std::vector< double >
m_angle_mean
Angle mean for alpha, beta and gamma linkage angles.
private std::vector< double >
m_torsion_mean
Torsion angle mean range for phi, psi and omega linkage torsions.
private std::vector< gemmi::Atom * >
m_all_atoms
List of pointers to all the atoms in the linkage to be refined
private std::vector< gemmi::Atom >
m_reference_atoms
List of pointers to reference atoms in the linkage to be refined
private Density *
m_density
Density object used for scoring to any derived density method (Xtal or EM)
private gemmi::Residue
m_reference_residue
The reference residue used for superpositons
private double
calculate_penalty_factor
() const
Calculates the penalty factor after looking at the scoring method in the m_density object.
Returns
A double representing the penalty factor for the given density method.
private static double
calculate_penalty
(double angle, double angle_mean, double angle_stddev, double penalty_factor)
Calculates the penalty for a given angle based on its deviation from the mean angle using the penalty factor.
Parameters
angle
The angle to calculate the penalty for.angle_mean
The mean angle.angle_stddev
The standard deviation of the angle.penalty_factor
The penalty factor to be applied.
Returns
The penalty value calculated for the given angle.