Geometry
              Geometry(parent_molecule_object)
¶
    A class containing a few gemoetry functions. Note that numpy should be used for most geometry functions.
Initializes the pymolecule.Geometry class.
parent_molecule_object: The pymolecule.Molecule object associated with this class.
            parent_molecule = parent_molecule_object
  
      instance-attribute
  
¶
    
            angle_between_three_points(pt1, pt2, pt3)
¶
    Computes the angle (in radians) formed by three points (np.array objects).
| PARAMETER | DESCRIPTION | 
|---|---|
                pt1
             | 
            
               A np.array (x, y, z) representing the first of the three 3D points. 
  | 
          
                pt2
             | 
            
               A np.array (x, y, z) representing the second of the three 3D points. 
  | 
          
                pt3
             | 
            
               A np.array (x, y, z) representing the third of the three 3D points. 
  | 
          
| RETURNS | DESCRIPTION | 
|---|---|
| 
               A float containing the angle between the three points, in radians.  | 
          
            dihedral_angle(pt1, pt2, pt3, pt4)
¶
    Calculates the dihedral angle formed by four points (np.array objects).
| PARAMETER | DESCRIPTION | 
|---|---|
                pt1
             | 
            
               A np.array (x, y, z) representing the first 3D point. 
  | 
          
                pt2
             | 
            
               A np.array (x, y, z) representing the second 3D point. 
  | 
          
                pt3
             | 
            
               A np.array (x, y, z) representing the third 3D point. 
  | 
          
                pt4
             | 
            
               A np.array (x, y, z) representing the fourth 3D point. 
  | 
          
| RETURNS | DESCRIPTION | 
|---|---|
| 
               A float containing the dihedral angle between the four points, in radians.  | 
          
            is_planar(pt1, pt2, pt3, pt4, planarity_cutoff=0.2)
¶
    Checks whether four points (np.array) lie in a common plane.
| PARAMETER | DESCRIPTION | 
|---|---|
                pt1
             | 
            
               A np.array (x, y, z) representing a 3D point. 
  | 
          
                pt2
             | 
            
               A np.array (x, y, z) representing a 3D point. 
  | 
          
                pt3
             | 
            
               A np.array (x, y, z) representing a 3D point. 
  | 
          
                pt4
             | 
            
               A np.array (x, y, z) representing a 3D point. 
  | 
          
                planarity_cutoff
             | 
            
               An optional float. How much the points can deviate (in Angstroms) and still be considered planar. The default is 0.2. 
                  
                    DEFAULT:
                        | 
          
| RETURNS | DESCRIPTION | 
|---|---|
| 
               A boolean, whether the 4 points can be considered planar.  | 
          
            planarity_deviation(pt1, pt2, pt3, pt4)
¶
    Determines how close four points (np.array objects) come to lying in a common plane.
| PARAMETER | DESCRIPTION | 
|---|---|
                pt1
             | 
            
               A np.array (x, y, z) representing a 3D point. 
  | 
          
                pt2
             | 
            
               A np.array (x, y, z) representing a 3D point. 
  | 
          
                pt3
             | 
            
               A np.array (x, y, z) representing a 3D point. 
  | 
          
                pt4
             | 
            
               A np.array (x, y, z) representing a 3D point. 
  | 
          
| RETURNS | DESCRIPTION | 
|---|---|
| 
               A float, the minimum distance between one point and the plane formed by the other three.  |