Update instructions in containers.rst
[gromacs.git] / src / gromacs / gmxana / sfactor.h
blob97b1ce1953641161855cbec3ea8703d7c782dec0
1 /*
2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5 * Copyright (c) 2001-2004, The GROMACS development team.
6 * Copyright (c) 2013,2014,2015,2016,2018 by the GROMACS development team.
7 * Copyright (c) 2019,2020, by the GROMACS development team, led by
8 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
9 * and including many others, as listed in the AUTHORS file in the
10 * top-level source directory and at http://www.gromacs.org.
12 * GROMACS is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public License
14 * as published by the Free Software Foundation; either version 2.1
15 * of the License, or (at your option) any later version.
17 * GROMACS is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with GROMACS; if not, see
24 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
25 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 * If you want to redistribute modifications to GROMACS, please
28 * consider that scientific software is very special. Version
29 * control is crucial - bugs must be traceable. We will be happy to
30 * consider code for inclusion in the official distribution, but
31 * derived work must not be called official GROMACS. Details are found
32 * in the README & COPYING files - if they are missing, get the
33 * official version at http://www.gromacs.org.
35 * To help us fund GROMACS development, we humbly ask that you cite
36 * the research papers on the package. Check out http://www.gromacs.org.
38 #ifndef GMX_GMXANA_SFACTOR_H
39 #define GMX_GMXANA_SFACTOR_H
41 #include "gromacs/math/gmxcomplex.h"
42 #include "gromacs/math/vectypes.h"
43 #include "gromacs/utility/basedefinitions.h"
45 struct gmx_output_env_t;
46 struct t_topology;
47 struct t_trxframe;
49 typedef struct gmx_structurefactors gmx_structurefactors_t;
51 typedef struct structure_factor structure_factor_t;
53 typedef struct reduced_atom reduced_atom_t;
55 int* create_indexed_atom_type(reduced_atom_t* atm, int size);
57 void compute_structure_factor(structure_factor_t* sft,
58 matrix box,
59 reduced_atom_t* red,
60 int isize,
61 real start_q,
62 real end_q,
63 int group,
64 real** sf_table);
66 gmx_structurefactors_t* gmx_structurefactors_init(const char* datfn);
68 void gmx_structurefactors_done(gmx_structurefactors_t* gsf);
70 int gmx_structurefactors_get_sf(gmx_structurefactors_t* gsf, int elem, real a[4], real b[4], real* c);
72 real** gmx_structurefactors_table(gmx_structurefactors_t* gsf, real momentum, real ref_k, real lambda, int n_angles);
74 void save_data(structure_factor_t* sft, const char* file, int ngrps, real start_q, real end_q, const gmx_output_env_t* oenv);
76 double CMSF(gmx_structurefactors_t* gsf, int type, int nh, double lambda, double sin_theta);
78 int return_atom_type(const char* name, gmx_structurefactors_t* gsf);
80 void rearrange_atoms(reduced_atom_t* positions,
81 struct t_trxframe* fr,
82 const int* index,
83 int isize,
84 const t_topology* top,
85 gmx_bool flag,
86 gmx_structurefactors_t* gsf);
88 int do_scattering_intensity(const char* fnTPS,
89 const char* fnNDX,
90 const char* fnXVG,
91 const char* fnTRX,
92 const char* fnDAT,
93 real start_q,
94 real end_q,
95 real energy,
96 int ng,
97 const gmx_output_env_t* oenv);
99 t_complex*** rc_tensor_allocation(int x, int y, int z);
101 real** compute_scattering_factor_table(gmx_structurefactors_t* gsf, structure_factor_t* sft);
103 #endif