-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeclaration.h
More file actions
109 lines (83 loc) · 4.67 KB
/
Copy pathdeclaration.h
File metadata and controls
109 lines (83 loc) · 4.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
//
// Created by Mingqiu Wang on 5/7/16.
//
#ifndef NANOAD_DECLARATION_H
#define NANOAD_DECLARATION_H
#include <ostream>
#include <stdio.h>
#include <stdlib.h>
#include <utility>
#include <iostream>
#include <queue>
#include <fstream>
#include "outputs.h"
#include "parameters.h"
#include "SFMT.h"
#include "dataStructures.h"
#include "variables.h"
/* ======= adhesion.cpp ============================================= */
void breakageCheck(std::set<int> & activeBonds, std::vector<bond> & bonds,
std::vector<ligand> & ligands, std::vector<receptor> & receptors);
void formationCheck(const std::vector<int> & availLig, const std::vector<int> & availRec,
std::set<int> &activeBonds, std::vector<ligand> & ligands,
std::vector<receptor> & receptors);
bool ifBreak(double delta);
bool ifForm(double delta);
int formBond(int lig, int rec, std::vector<ligand> & ligands, std::vector<receptor> & receptors,
std::vector<bond> & bonds);
bool ifDetach(const coord & position);
/* ======= force.cpp =================================================== */
coord Frepulsion(const double & npheight);
std::pair<coord, coord> Fshear(const double & npheight);
void acceleration(std::pair<coord, coord> Fbond, std::pair<coord, coord> Fshear, coord Frepulsion);
std::pair<coord, coord> Fbond(const std::set<int> & activeBond, const std::vector<bond> & bonds,
const std::vector<receptor> & receptors, const std::vector<ligand> & ligands);
void acceleration(std::pair<coord, coord> Fbond, std::pair<coord, coord> Fshear, coord Frepulsion);
/* ======= utilities.cpp ============================================= */
void setRNG(sfmt_t & sfmt);
std::pair<double, double> distribute
(double upper_dis, double lower_dis, const std::pair<double, double>& i);
// distribute a point close (closer than upper_dis && further than lower_dis) to a given point i
double dist(double rectx, double recty, double rectz, double surfx, double surfy, double surfz);
// get distance between two points
double dist(const coord &coord1, const coord &coord2); // get distance between two points
double dist(const std::pair<double, double> & coord1, const std::pair<double, double> & coord2);
double distSQ(const coord &coord1, const coord &coord2);
coord angle_trans(double ph, double tht, double radius); // transfer spherical to Cartesian
void getAvailRec(std::vector<int> & availRec, struct np & np);
void getAvailLig(std::vector<int> & availLig, const std::vector<ligand> & ligands);
double gasdev(long idum);
bool ifCross (const std::set<int> & activeBond, const std::vector<receptor> & receptors,
const std::vector<ligand> & ligands, const int checkLig, const int checkRec);
double seg_seg_Dist (const coord & rec1, const coord & lig2, const coord & rec3, const coord & lig4);
double distance_P_S(const coord & a0, const coord & a1, const coord & a2);
/* ======= ini.cpp ============================================= */
void ini_receptors_doubleCluster(std::vector<receptor> &receptors); // initialize receptors
void ini_receptor_monomer(std::vector<receptor> & receptors); // initialize receptors
void ini_receptor_cluster(std::vector<receptor> &receptors); // initialize receptors
void ini_ligand(std::vector<ligand> & ligands); // initialize ligands
void ini_binding(std::vector<receptor> & receptors, std::vector<ligand> & ligands,
std::set<int> & activeBonds, std::vector<bond> & bonds, const struct np & np); // initialize binding
void ini_np(struct np & np); // initialize nanoparticle
bool resume();
void ini();
/* ======= linker.cpp ============================================= */
double delta2_com(double);
double delta2_ext(double);
void breakageCheck_linker(std::set<int> &activeBonds, std::vector<bond> & bonds,
std::vector<ligand> & ligands, std::vector<receptor> & receptors);
std::pair<coord, coord> Fbond_linker(const std::set<int> & activeBond, const std::vector<bond> & bonds,
const std::vector<receptor> & receptors, const std::vector<ligand> & ligands);
/* ======= motion.cpp ============================================= */
void translation(coord &velocity, coord &position, const coord &acc);
std::vector<coord> rotate(coord & velocity, const coord & acc);
void rotateLig (std::vector<ligand> & ligands, const std::vector<coord> & rotationMatrix, const coord & NPposition);
/* ======= reporting.cpp ============================================= */
void checkDisplace(unsigned long long &step);
void writeBond();
void writeEndTime();
void writeLoc();
void writeResume();
void writeInTimeBondL();
void writeInTimeBondF();
#endif //NANOAD_DECLARATION_H