This repository was archived by the owner on Mar 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathreplicas.h
More file actions
45 lines (36 loc) · 1.79 KB
/
replicas.h
File metadata and controls
45 lines (36 loc) · 1.79 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
#ifndef REPLICAS_H
#define REPLICAS_H
struct contact_map;
/** Replica data structure. This provides context for the replica
* exchange simulation. */
struct replicas {
gsl_rng *rng; /**< Random number generator. */
struct protein *protein; /**< Protein to be simulated. */
struct contact_map *native_map; /**< Native contacts. */
double a; /**< Tolerance for distances between amino acids. */
size_t num_replicas; /**< Number of replicas. */
size_t *exchanges; /**< Number of exchanges per pair of replicas. */
size_t *total; /**< Number of attempted exchanges per pair of replicas. */
FILE *log; /**< Log file. */
struct simulation *replica[]; /**< Array of replicas. */
};
/** Auxiliary options for new_replicas. */
struct simulation_options {
gsl_rng *rng;
double d_max, a;
size_t num_replicas;
double *temperatures;
};
extern struct replicas *new_replicas(struct protein *protein,
const struct simulation_options *options);
extern void delete_replicas(struct replicas *self);
extern void replicas_thermalize(struct replicas *self, size_t num_iters);
extern void replicas_resume(struct replicas *self,
const struct protein *config[]);
extern void replicas_first_iteration(struct replicas *self);
extern void replicas_next_iteration(struct replicas *self);
extern size_t replicas_total_exchanges(const struct replicas *self);
extern void replicas_get_exchange_ratios(const struct replicas *self,
double ratios[]);
extern void replicas_print_info(const struct replicas *self, FILE *stream);
#endif // !REPLICAS_H