  | 
  
    Pteros
    2.0
    
   Molecular modeling library for human beings! 
   | 
 
 
 
 
   34 #include "pteros/core/typedefs.h" 
   53     PeriodicBox(Vector3f_const_ref vectors, Vector3f_const_ref angles);
 
   62     float get_element(
int i, 
int j) 
const;
 
   65     void set_element(
int i, 
int j, 
float val);
 
   71     void set_vector(Vector3f_const_ref vec, 
int i);
 
   87     Eigen::Vector3f 
lab_to_box(Vector3f_const_ref point) 
const;
 
   93     Eigen::Vector3f 
box_to_lab(Vector3f_const_ref point) 
const;
 
  102     Eigen::Vector3f 
extents() 
const;
 
  117     float distance(Vector3f_const_ref point1,
 
  118                    Vector3f_const_ref point2,         
 
  119                    Array3i_const_ref pbc = fullPBC) 
const;
 
  123                    Vector3f_const_ref point2,                   
 
  124                    Array3i_const_ref pbc = fullPBC) 
const;
 
  129                     Array3i_const_ref pbc = fullPBC,
 
  130                     Vector3f_const_ref origin = Eigen::Vector3f::Zero()) 
const;
 
  134     bool in_box(Vector3f_const_ref point, Vector3f_const_ref origin = Eigen::Vector3f::Zero()) 
const;
 
  138                                       Vector3f_const_ref target,
 
  139                                       Array3i_const_ref pbc = fullPBC) 
const;
 
  143                                     Vector3f_const_ref point2,
 
  144                                     Array3i_const_ref pbc = fullPBC) 
const;
 
  165     Eigen::Matrix3f _box;
 
  166     Eigen::Matrix3f _box_inv;    
 
  170     void recompute_internals();
 
  
 
Eigen::Vector3f closest_image(Vector3f_const_ref point, Vector3f_const_ref target, Array3i_const_ref pbc=fullPBC) const
Finds a periodic image of point, which is closest in space to target and returns it
Definition: periodic_box.cpp:172
 
Eigen::Vector3f lab_to_box(Vector3f_const_ref point) const
Convert point from lab coordinates to box coordinates.
Definition: periodic_box.cpp:111
 
void from_pdb_box(const char *line)
Read box from CRYST string in PDB format. Overwrites current box!
Definition: periodic_box.cpp:226
 
void to_vectors_angles(Vector3f_ref vectors, Vector3f_ref angles) const
Returns representation of the box as vector lengths and angles.
Definition: periodic_box.cpp:297
 
bool is_triclinic() const
Is the box triclinic?
Definition: periodic_box.h:105
 
void from_vectors_angles(Vector3f_const_ref vectors, Vector3f_const_ref angles)
Creates box from vector length and angles.
Definition: periodic_box.cpp:342
 
bool is_periodic() const
Is the box set? If false, the system is not periodic.
Definition: periodic_box.h:108
 
float extent(int i) const
Return i-th extent of the box.
Definition: periodic_box.cpp:127
 
bool in_box(Vector3f_const_ref point, Vector3f_const_ref origin=Eigen::Vector3f::Zero()) const
Determine if the point is inside the box Origin of the box coordinates defaults to {0,...
Definition: periodic_box.cpp:161
 
Eigen::Matrix3f get_inv_matrix() const
Get stored inverted matrix of box vectors.
Definition: periodic_box.cpp:107
 
PeriodicBox & operator=(const PeriodicBox &other)
Assignment operator.
Definition: periodic_box.cpp:63
 
Eigen::Vector3f box_to_lab(Vector3f_const_ref point) const
Convert point from box coordinates to lab coordinates.
Definition: periodic_box.cpp:119
 
std::string to_pdb_box() const
Write box as CRYST string in PDB format.
Definition: periodic_box.cpp:318
 
Eigen::Matrix3f get_matrix() const
Get stored matrix of box vectors.
Definition: periodic_box.cpp:96
 
Eigen::Vector3f shortest_vector(Vector3f_const_ref point1, Vector3f_const_ref point2, Array3i_const_ref pbc=fullPBC) const
Computes shortest vector from point1 to point2 between their closest images.
Definition: periodic_box.cpp:177
 
void scale_vectors(Vector3f_const_ref scale)
Scale box vectors by specified factors.
Definition: periodic_box.cpp:100
 
void set_vector(Vector3f_const_ref vec, int i)
Set i-th box vector.
Definition: periodic_box.cpp:90
 
Class encapsulating all operations with arbitrary triclinic periodic boxes This class stores the peri...
Definition: periodic_box.h:43
 
float distance(Vector3f_const_ref point1, Vector3f_const_ref point2, Array3i_const_ref pbc=fullPBC) const
Compute a periodic distance between two points in the box Periodicity is only accouted for given set ...
Definition: periodic_box.cpp:140
 
float distance_squared(Vector3f_const_ref point1, Vector3f_const_ref point2, Array3i_const_ref pbc=fullPBC) const
The same as distance but returns squared distance.
Definition: periodic_box.cpp:135
 
Eigen::Vector3f get_vector(int i) const
Get i-th box vector.
Definition: periodic_box.cpp:86
 
void set_matrix(Matrix3f_const_ref box)
Modify the box from 3x3 matrix.
Definition: periodic_box.cpp:80
 
Eigen::Matrix3f lab_to_box_transform() const
Return the transformation from lab coordinates to box coordinates.
Definition: periodic_box.cpp:115
 
void wrap_point(Vector3f_ref point, Array3i_const_ref pbc=fullPBC, Vector3f_const_ref origin=Eigen::Vector3f::Zero()) const
Wrap point to the box for given set of dimensions Origin of the box coordinates defaults to {0,...
Definition: periodic_box.cpp:149
 
Eigen::Vector3f extents() const
Return the vector of box extents.
Definition: periodic_box.cpp:131
 
float volume()
Returns box volume.
Definition: periodic_box.cpp:145
 
Eigen::Matrix3f box_to_lab_transform() const
Return the transformation from box coordinates to lab coordinates.
Definition: periodic_box.cpp:123
 
PeriodicBox()
Default constructor.
Definition: periodic_box.cpp:46