Merge branch 'master' of git.gromacs.org:gromacs
[gromacs/rigid-bodies.git] / include / sfactor.h
blobea2e529af922e401f995697966985289f98bff3e
1 /*
2 *
3 * This source code is part of
4 *
5 * G R O M A C S
6 *
7 * GROningen MAchine for Chemical Simulations
8 *
9 * VERSION 3.2.0
10 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12 * Copyright (c) 2001-2004, The GROMACS development team,
13 * check out http://www.gromacs.org for more information.
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * If you want to redistribute modifications, please consider that
21 * scientific software is very special. Version control is crucial -
22 * bugs must be traceable. We will be happy to consider code for
23 * inclusion in the official distribution, but derived work must not
24 * be called official GROMACS. Details are found in the README & COPYING
25 * files - if they are missing, get the official version at www.gromacs.org.
27 * To help us fund GROMACS development, we humbly ask that you cite
28 * the papers on the package - you can find them in the top README file.
30 * For more info, check our website at http://www.gromacs.org
32 * And Hey:
33 * Gromacs Runs On Most of All Computer Systems
36 #ifndef _sfactor_h
37 #define _sfactor_h
40 #ifdef HAVE_CONFIG_H
41 #include <config.h>
42 #endif
44 #include "index.h"
45 #include "types/simple.h"
46 #include "gmxcomplex.h"
47 #include "oenv.h"
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
56 typedef struct gmx_structurefactors gmx_structurefactors_t;
58 typedef struct structure_factor structure_factor_t;
60 typedef struct reduced_atom reduced_atom_t;
62 extern int * create_indexed_atom_type (reduced_atom_t * atm, int size);
64 extern void compute_structure_factor (structure_factor_t * sft, matrix box,
65 reduced_atom_t * red, int isize, real start_q,
66 real end_q, int group,real **sf_table);
68 extern gmx_structurefactors_t *gmx_structurefactors_init(const char *datfn);
70 extern void gmx_structurefactors_done(gmx_structurefactors_t *gsf);
72 extern int gmx_structurefactors_get_sf(gmx_structurefactors_t *gsf, int elem, real a[4], real b[4], real *c);
74 extern real **gmx_structurefactors_table(gmx_structurefactors_t *gsf,real momentum, real ref_k,
75 real lambda, int n_angles);
77 extern void save_data (structure_factor_t * sft, const char *file, int ngrps,
78 real start_q, real end_q, const output_env_t oenv);
80 extern double CMSF (gmx_structurefactors_t *gsf,int type,int nh,double lambda, double sin_theta);
82 extern int return_atom_type (const char *name,gmx_structurefactors_t *gsf);
84 extern void rearrange_atoms (reduced_atom_t * positions, t_trxframe *fr, atom_id * index,
85 int isize, t_topology * top, bool flag,gmx_structurefactors_t *gsf);
87 extern int do_scattering_intensity (const char* fnTPS, const char* fnNDX,
88 const char* fnXVG, const char *fnTRX,
89 const char* fnDAT,
90 real start_q,real end_q,
91 real energy,int ng,const output_env_t oenv);
93 extern t_complex *** rc_tensor_allocation(int x, int y, int z);
95 extern real **compute_scattering_factor_table (gmx_structurefactors_t *gsf,structure_factor_t * sft,int *nsftable);
97 #ifdef __cplusplus
99 #endif
100 #endif