Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 191 lines (157 sloc) 8.852 kb
3ec68b4 @olenz Replaced headers in all files.
olenz authored
1 /*
8bbd603 @olenz Updated copyright headers.
olenz authored
2 Copyright (C) 2010,2012 The ESPResSo project
b51a5c2 @olenz Updated copyright headers.
olenz authored
3 Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
4 Max-Planck-Institute for Polymer Research, Theory Group
3ec68b4 @olenz Replaced headers in all files.
olenz authored
5
6 This file is part of ESPResSo.
7
8 ESPResSo is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 ESPResSo is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
c543db1 @arnolda Analysis code splitup.
arnolda authored
21 #ifndef STATISTICS_CHAIN_H
22 #define STATISTICS_CHAIN_H
50eea71 Updated some documentation.
Hans-Jörg Limbach authored
23 /** \file statistics_chain.h
24
25 This file contains the code for statistics on the data using the
26 molecule information set with analyse set chains.
27 */
c543db1 @arnolda Analysis code splitup.
arnolda authored
28
abc1419 @kosovan Split of core/TCL in statistics_chain
kosovan authored
29 /** \name Exported Variables */
30 /************************************************************/
31 /** Particles' initial positions (needed for g1(t), g2(t), g3(t) in \ref tclcommand_analyze) */
32 /*@{*/
33 extern float *partCoord_g;
34 extern float *partCM_g;
35 extern int n_part_g;
36 extern int n_chains_g;
37 /*@}*/
38
39 /** data for a system consisting of chains. TBRS. */
40 /*@{*/
41 extern int chain_start;
42 extern int chain_n_chains;
43 extern int chain_length;
44 /*@}*/
45
46
c543db1 @arnolda Analysis code splitup.
arnolda authored
47 /** \name Exported Functions */
48 /************************************************************/
49 /*@{*/
50
51 /** calculate the end-to-end-distance. chain information \ref chain_start etc. must be set!
52 @return the end-to-end-distance */
53 void calc_re(double **re);
54
55 /** calculate the end-to-end-distance averaged over all configurations stored in \ref #configs.
56 Chain information \ref chain_start etc. must be set!
57 @return the averaged end-to-end-distance */
58 void calc_re_av(double **re);
59
60 /** calculate the radius of gyration. chain information \ref chain_start etc. must be set!
61 @return the radius of gyration */
62 void calc_rg(double **rg);
63
64 /** calculate the radius of gyration averaged over all configurations stored in \ref #configs.
65 Chain information \ref chain_start etc. must be set!
66 @return the averaged radius of gyration */
67 void calc_rg_av(double **rg);
68
f8681ec [BUGFIX] Corrected the calculation of the hydrodynamic radius. The facto...
Kai Grass authored
69 /** calculate the hydrodynamic radius (ref. Kirkwood-Zimm theory). chain information \ref chain_start etc. must be set!
c543db1 @arnolda Analysis code splitup.
arnolda authored
70 @return the hydrodynamic radius */
71 void calc_rh(double **rh);
72
73 /** calculate the hydrodynamic radius averaged over all configurations stored in \ref #configs.
74 Chain information \ref chain_start etc. must be set!
75 @return the averaged hydrodynamic radius */
76 void calc_rh_av(double **rh);
77
78 /** calculates the internal distances within a chain. Chain information \ref chain_start etc. must be set!
79 @param idf contains <tt>idf[0],...,idf[chain_length-1]</tt> */
80 void calc_internal_dist(double **idf);
81
82 /** calculates the internal distances within a chain averaged over all configurations stored in \ref #configs.
83 Chain information \ref chain_start etc. must be set!
84 @param idf contains <tt>idf[0],...,idf[chain_length-1]</tt> */
85 void calc_internal_dist_av(double **idf);
86
87 /** calculates the bond length between two neighbouring monomers (i.e. idf[1] in \ref calc_internal_dist).
88 Chain information \ref chain_start etc. must be set!
89 @param bond_l returns the bond length */
0b9b95f - Fixed wrong references for the documentation.
Bernward Mann authored
90 void calc_bond_l(double **bond_l);
c543db1 @arnolda Analysis code splitup.
arnolda authored
91
92 /** calculates the averaged bond length between two neighbouring monomers (i.e. idf[1] in \ref calc_internal_dist_av).
93 Chain information \ref chain_start etc. must be set!
94 @param bond_l returns the bond length */
0b9b95f - Fixed wrong references for the documentation.
Bernward Mann authored
95 void calc_bond_l_av(double **bond_l);
c543db1 @arnolda Analysis code splitup.
arnolda authored
96
a11e5f1 Bugs fixed for creating documentation with SUSE 9.0
Hans-Jörg Limbach authored
97 /** calculates the internal distances within a chain measured from monomer \<ind_n\>.
c543db1 @arnolda Analysis code splitup.
arnolda authored
98 Chain information \ref chain_start etc. must be set!
99 @param bdf contains <tt>bdf[0],...,bdf[(chain_length-1) - ind_n]</tt>
100 @param ind_n the index of the monomer from where all distances are taken */
101 void calc_bond_dist(double **bdf, int ind_n);
102
a11e5f1 Bugs fixed for creating documentation with SUSE 9.0
Hans-Jörg Limbach authored
103 /** calculates the internal distances within a chain measured from monomer \<ind_n\> averaged over all configurations stored in \ref #configs.
c543db1 @arnolda Analysis code splitup.
arnolda authored
104 Chain information \ref chain_start etc. must be set!
105 @param bdf contains <tt>bdf[0],...,bdf[(chain_length-1) - ind_n]</tt>
106 @param ind_n the index of the monomer from where all distances are taken */
107 void calc_bond_dist_av(double **bdf, int ind_n);
108
109 /** calculate g123. chain information \ref chain_start etc. must be set!
110 @param g1 contains g1
111 @param g2 contains g2
112 @param g3 contains g3
113 */
114 void calc_g123(double *g1, double *g2, double *g3);
115
a11e5f1 Bugs fixed for creating documentation with SUSE 9.0
Hans-Jörg Limbach authored
116 /** calculate \<g1\> averaged over all configurations stored in \ref #configs.
c543db1 @arnolda Analysis code splitup.
arnolda authored
117 Chain information \ref chain_start etc. must be set!
7d24399 @arnolda fixed the doxygen errors
arnolda authored
118 @param _g1 contains <tt>g1[0],...,g1[n_configs-1]</tt>
119 @param window if large than 0, the window size for a sliding window analysis
120 @param weights weights for the different coordinates, basically to allow to calculate 2d g1
c543db1 @arnolda Analysis code splitup.
arnolda authored
121 */
abc1419 @kosovan Split of core/TCL in statistics_chain
kosovan authored
122 void calc_g1_av(double **_g1, int window, double weights[3]);
c543db1 @arnolda Analysis code splitup.
arnolda authored
123
a11e5f1 Bugs fixed for creating documentation with SUSE 9.0
Hans-Jörg Limbach authored
124 /** calculate \<g2\> averaged over all configurations stored in \ref #configs.
c543db1 @arnolda Analysis code splitup.
arnolda authored
125 Chain information \ref chain_start etc. must be set!
7d24399 @arnolda fixed the doxygen errors
arnolda authored
126 @param _g2 contains <tt>g2[0],...,g2[n_configs-1]</tt>
127 @param window if large than 0, the window size for a sliding window analysis
128 @param weights weights for the different coordinates, basically to allow to calculate 2d g1
c543db1 @arnolda Analysis code splitup.
arnolda authored
129 */
abc1419 @kosovan Split of core/TCL in statistics_chain
kosovan authored
130 void calc_g2_av(double **_g2, int window, double weights[3]);
c543db1 @arnolda Analysis code splitup.
arnolda authored
131
a11e5f1 Bugs fixed for creating documentation with SUSE 9.0
Hans-Jörg Limbach authored
132 /** calculate \<g3\> averaged over all configurations stored in \ref #configs.
c543db1 @arnolda Analysis code splitup.
arnolda authored
133 Chain information \ref chain_start etc. must be set!
7d24399 @arnolda fixed the doxygen errors
arnolda authored
134 @param _g3 contains <tt>g3[0],...,g3[n_configs-1]</tt>
135 @param window if large than 0, the window size for a sliding window analysis
136 @param weights weights for the different coordinates, basically to allow to calculate 2d g1
c543db1 @arnolda Analysis code splitup.
arnolda authored
137 */
abc1419 @kosovan Split of core/TCL in statistics_chain
kosovan authored
138 void calc_g3_av(double **_g3, int window, double weights[3]);
139 //void calc_g3_av(double **g3);
c543db1 @arnolda Analysis code splitup.
arnolda authored
140
141 /** set the start configuration for g123.
142 chain information \ref chain_start etc. must be set!
143 */
144 void init_g123();
145
146 /** Derives the spherically averaged formfactor S(q) = 1/chain_length * Sum(i,j=1..chain_length)[sin(q*r_ij)/q*r_ij] of a single chain,
a11e5f1 Bugs fixed for creating documentation with SUSE 9.0
Hans-Jörg Limbach authored
147 averaged over all \ref chain_n_chains currently allocated (-\> chain information must be set!).
148 @param qmin smallest q-vector to look at (qmin \> 0)
149 @param qmax biggest q-vector to look at (qmax \> qmin)
c543db1 @arnolda Analysis code splitup.
arnolda authored
150 @param qbins decides how many S(q) are derived (note that the qbins+1 values will be logarithmically spaced)
151 @param _ff contains S(q) as an array of size qbins */
152 void analyze_formfactor(double qmin, double qmax, int qbins, double **_ff);
153
154 /** Derives the spherically averaged formfactor S(q) = 1/chain_length * Sum(i,j=1..chain_length)[sin(q*r_ij)/q*r_ij] of a single chain,
155 averaged over all \ref chain_n_chains of all \ref n_configs stored configurations in \ref #configs.
a11e5f1 Bugs fixed for creating documentation with SUSE 9.0
Hans-Jörg Limbach authored
156 @param qmin smallest q-vector to look at (qmin \> 0)
157 @param qmax biggest q-vector to look at (qmax \> qmin)
c543db1 @arnolda Analysis code splitup.
arnolda authored
158 @param qbins decides how many S(q) are derived (note that the qbins+1 values will be logarithmically spaced)
159 @param _ff contains S(q) as an array of size qbins */
160 void analyze_formfactor_av(double qmin, double qmax, int qbins, double **_ff);
161
b0743b8 Two new subroutines for structural analysis:
Dmytro Antypov authored
162 /** Calculates monomer-monomer distribution between monomers of different chains.
163 @param r_min minimal distance for the distribution.
164 @param r_max maximal distance for the distribution.
165 @param r_bins the number of bins
166 @param _rdf contains the monomer-monomer distribution
167 @param _rdf_cm contains the distribution of centers of mass of the chains
168 @param _rdf_d contains the distribution of closest distances between the chains
169 */
6f325fe A misprint in docu
Dmytro Antypov authored
170 void analyze_rdfchain(double r_min, double r_max, int r_bins, double **_rdf, double **_rdf_cm, double **_rdf_d);
aed4394 Added a flag to imd positions "-fold_chains" which allows chain molecule...
Ira Cooke authored
171
17af091 New analysis routine cwvac needs charges. ifdef ELECTROSTATICS added.
Kai Grass authored
172 #ifdef ELECTROSTATICS
4fb8465 [NEW] Added analysis function [analyze cwvac]: analyze cwvac calculates ...
Kai Grass authored
173 /** Calculates the (charge weighted) velocity auto-correlation function from the stored configurations.
174 * The charge weighted velocity auto-correlation function is used to determine
175 * the electrophoretic mobility of a chain using Green-Kubo relation.
176 *
177 * cwvac(tau) = < sum_i^N ( q_i*v_i(t0)*v_CM(t0+tau) ) >
178 @param maxtau maximal tau
179 @param interval step between t0, sampling frequency
180 @param _avac contains the averaged(=over all chains in the system) velocity auto-correlation
181 @param _evac contains the error associated with the averaged velocity auto-correlation function
182 */
183 void analyze_cwvac(int maxtau, int interval, double **_avac, double **_evac);
17af091 New analysis routine cwvac needs charges. ifdef ELECTROSTATICS added.
Kai Grass authored
184 #endif
678a28d @arnolda New topology structure. Generic I/O and chains.
arnolda authored
185
efef39f added new option to synchronize topology and particle.mol_id information
Ira Cooke authored
186 /** sets the particle mol_id according to the chain_structure info*/
187 void update_mol_ids_setchains();
188
c543db1 @arnolda Analysis code splitup.
arnolda authored
189
190 #endif
Something went wrong with that request. Please try again.