Pteros  2.0
Molecular modeling library for human beings!
jump_remover.h
1 /*
2  * This file is a part of
3  *
4  * ============================================
5  * ### Pteros molecular modeling library ###
6  * ============================================
7  *
8  * https://github.com/yesint/pteros
9  *
10  * (C) 2009-2021, Semen Yesylevskyy
11  *
12  * All works, which use Pteros, should cite the following papers:
13  *
14  * 1. Semen O. Yesylevskyy, "Pteros 2.0: Evolution of the fast parallel
15  * molecular analysis library for C++ and python",
16  * Journal of Computational Chemistry, 2015, 36(19), 1480–1488.
17  * doi: 10.1002/jcc.23943.
18  *
19  * 2. Semen O. Yesylevskyy, "Pteros: Fast and easy to use open-source C++
20  * library for molecular analysis",
21  * Journal of Computational Chemistry, 2012, 33(19), 1632–1636.
22  * doi: 10.1002/jcc.22989.
23  *
24  * This is free software distributed under Artistic License:
25  * http://www.opensource.org/licenses/artistic-license-2.0.php
26  *
27 */
28 
29 
30 #pragma once
31 
32 #include "pteros/core/selection.h"
33 #include "pteros/analysis/frame_info.h"
34 
35 namespace pteros {
36 
37 class JumpRemover {
38 public:
39  JumpRemover();
40  void add_atoms(const Selection &sel);
41  void set_pbc(Array3i_const_ref pbc);
43  void set_unwrap_dist(float d);
44  void set_pbc_atom(int ind);
45 
46  // Remove jumps
47  void remove_jumps(System& system);
48 
49 private:
50  // Indexes for removing jumps
51  std::vector<int> no_jump_ind;
52  // Running reference coordinates for removing jumps
53  Eigen::MatrixXf no_jump_ref;
54  // Dimensions to consider
55  Eigen::Array3i dims;
56  // Starting distance for unwrapping. -1 means no unwrapping (default)
57  float unwrap_d;
58  // Leading index for unwrapping
59  int pbc_atom;
60 
61  bool initialized;
62 };
63 
64 } // namespace