Pteros  2.0
Molecular modeling library for human beings!
jump_remover.h
1 /*
2  *
3  * This source code is part of
4  * ******************
5  * *** Pteros ***
6  * ******************
7  * molecular modeling library
8  *
9  * Copyright (c) 2009-2013, Semen Yesylevskyy
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of Artistic License:
13  *
14  * Please note, that Artistic License is slightly more restrictive
15  * then GPL license in terms of distributing the modified versions
16  * of this software (they should be approved first).
17  * Read http://www.opensource.org/licenses/artistic-license-2.0.php
18  * for details. Such license fits scientific software better then
19  * GPL because it prevents the distribution of bugged derivatives.
20  *
21 */
22 
23 #ifndef JUMP_REMOVER_H
24 #define JUMP_REMOVER_H
25 
26 #include "pteros/core/selection.h"
27 #include "pteros/analysis/frame_info.h"
28 
29 #include <iostream>
30 
31 namespace pteros {
32 
33 class Jump_remover {
34 public:
35  Jump_remover();
36  void add_atoms(const Selection &sel);
37  void set_dimensions(Vector3i_const_ref dim);
39  void set_unwrap_dist(float d);
40  void set_leading_index(int ind);
41 
42  // Remove jumps
43  void remove_jumps(System& system, const Frame_info &info);
44 
45 private:
46  // Indexes for removing jumps
47  std::vector<int> no_jump_ind;
48  // Running reference coordinates for removing jumps
49  Eigen::MatrixXf no_jump_ref;
50  // Dimensions to consider
51  Eigen::Vector3i dims;
52  // Starting distance for unwrapping. -1 means no unwrapping (default)
53  float unwrap_d;
54  // Leading index for unwrapping
55  int leading_index;
56 };
57 
58 } // namespace
59 
60 #endif
Pteros namespace.
Definition: options.cpp:32