-
Notifications
You must be signed in to change notification settings - Fork 0
/
ccp4_maplib_fem.hpp
126 lines (111 loc) · 1.85 KB
/
ccp4_maplib_fem.hpp
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#ifndef CCP4IO_ADAPTBX_CCP4_MAPLIB_FEM_HPP
#define CCP4IO_ADAPTBX_CCP4_MAPLIB_FEM_HPP
#include <fem.hpp> // Fortran EMulation library of fable module
extern "C" {
void
mwrhdl_(
int const* iunit,
char const* mapnam,
char const* title,
int const* nsec,
int const* iuvw,
int const* mxyz,
int const* nw1,
int const* nu1,
int const* nu2,
int const* nv1,
int const* nv2,
float const* cell,
int const* lspgrp,
int* lmode,
int mapnam_len,
int title_len);
void
mwrsec_(
int const* iunit,
/*arr_cref<float, 2>*/ float const* x,
int const* mu,
int const* mv,
int const* iu1,
int const* iu2,
int const* iv1,
int const* iv2);
void
mwclose_(
int const* iunit);
void
msywrt_(
int const* iunit,
int const* nsym,
/*arr_cref<float, 3>*/ float const* rot);
} // extern "C"
namespace ccp4_maplib_fem {
using namespace fem::major_types;
inline
void
mwrhdl(
int const& iunit,
str_cref mapnam,
str_cref title,
int const& nsec,
arr_cref<int> iuvw,
arr_cref<int> mxyz,
int const& nw1,
int const& nu1,
int const& nu2,
int const& nv1,
int const& nv2,
arr_cref<float> cell,
int const& lspgrp,
int& lmode)
{
mwrhdl_(
&iunit,
mapnam.elems(),
title.elems(),
&nsec,
iuvw.begin(),
mxyz.begin(),
&nw1,
&nu1,
&nu2,
&nv1,
&nv2,
cell.begin(),
&lspgrp,
&lmode,
mapnam.len(),
title.len());
}
inline
void
mwrsec(
int const& iunit,
arr_cref<float, 2> x,
int const& mu,
int const& mv,
int const& iu1,
int const& iu2,
int const& iv1,
int const& iv2)
{
mwrsec_(&iunit, x.begin(), &mu, &mv, &iu1, &iu2, &iv1, &iv2);
}
inline
void
mwclose(
int const& iunit)
{
mwclose_(&iunit);
}
inline
void
msywrt(
int const& iunit,
int const& nsym,
arr_cref<float, 3> rot)
{
msywrt_(&iunit, &nsym, rot.begin());
}
} // namespace ccp4_maplib_fem
#endif // GUARD