blob: fea970222d258d1223b87a487c0f0e12496942c4 (
plain)
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
|
/*
* sfac.h
*
* Scattering factors
*
* (c) 2006-2010 Thomas White <taw@physics.org>
*
* Part of CrystFEL - crystallography with a FEL
*
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifndef SFAC_H
#define SFAC_H
#include <complex.h>
#include "cell.h"
#define MAX_ATOMS (128*1024)
struct mol_species
{
char species[4]; /* Species name */
int n_atoms; /* Number of atoms of this species */
double x[MAX_ATOMS];
double y[MAX_ATOMS];
double z[MAX_ATOMS];
double occ[MAX_ATOMS];
double B[MAX_ATOMS];
};
struct molecule
{
int n_species;
struct mol_species *species[32];
/* Unit cell */
UnitCell *cell;
/* Reflection intensities at Bragg positions */
double complex *reflections;
/* Offset to molecule's centre of scattering power */
double xc;
double yc;
double zc;
};
extern double complex get_sfac(const char *n, double s, double en);
extern struct molecule *load_molecule(void);
extern void free_molecule(struct molecule *mol);
extern struct molecule *copy_molecule(struct molecule *orig);
extern double complex *get_reflections(struct molecule *mol, double en);
extern void get_reflections_cached(struct molecule *mol, double en);
#endif /* SFAC_H */
|