Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plumed AlphaFold
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Kurečka
Plumed AlphaFold
Commits
d1982bd0
There was an error fetching the commit references. Please try again later.
Commit
d1982bd0
authored
5 years ago
by
Gareth Tribello
Committed by
carlocamilloni
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed code for fourier transform and fixed regtest
parent
6b889160
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
regtest/analysis/rt-fftw/f.grid.reference
+10002
-10206
10002 additions, 10206 deletions
regtest/analysis/rt-fftw/f.grid.reference
src/gridtools/FourierTransform.cpp
+11
-23
11 additions, 23 deletions
src/gridtools/FourierTransform.cpp
with
10013 additions
and
10229 deletions
regtest/analysis/rt-fftw/f.grid.reference
+
10002
−
10206
View file @
d1982bd0
This diff is collapsed.
Click to expand it.
src/gridtools/FourierTransform.cpp
+
11
−
23
View file @
d1982bd0
...
...
@@ -75,6 +75,7 @@ private:
public:
static
void
registerKeywords
(
Keywords
&
keys
);
explicit
FourierTransform
(
const
ActionOptions
&
ao
);
void
clearAverage
();
#ifndef __PLUMED_HAS_FFTW
void
performOperations
(
const
bool
&
from_update
)
{}
#else
...
...
@@ -171,32 +172,21 @@ FourierTransform::FourierTransform(const ActionOptions&ao):
#endif
}
void
FourierTransform
::
clearAverage
()
{
std
::
vector
<
double
>
fspacing
;
std
::
vector
<
std
::
string
>
ft_min
(
ingrid
->
getMin
()
),
ft_max
(
ingrid
->
getMax
()
);
for
(
unsigned
i
=
0
;
i
<
ingrid
->
getDimension
();
++
i
)
{
Tools
::
convert
(
0.0
,
ft_min
[
i
]
);
Tools
::
convert
(
2.0
*
pi
*
ingrid
->
getNbin
()[
i
]
/
ingrid
->
getGridExtent
(
i
),
ft_max
[
i
]
);
}
mygrid
->
setBounds
(
ft_min
,
ft_max
,
ingrid
->
getNbin
(),
fspacing
);
resizeFunctions
();
ActionWithAveraging
::
clearAverage
();
}
#ifdef __PLUMED_HAS_FFTW
void
FourierTransform
::
performOperations
(
const
bool
&
from_update
)
{
// Spacing of the real grid
std
::
vector
<
double
>
g_spacing
(
ingrid
->
getGridSpacing
()
);
// Spacing of the k-grid
std
::
vector
<
double
>
ft_spacing
;
// Extents of the k-grid
std
::
vector
<
std
::
string
>
ft_min
(
ingrid
->
getMin
()
),
ft_max
(
ingrid
->
getMax
()
);
// Number of bins in the k-grid (equal to the number of bins in the real grid)
std
::
vector
<
unsigned
>
ft_bins
(
ingrid
->
getNbin
()
);
for
(
unsigned
i
=
0
;
i
<
ingrid
->
getDimension
();
++
i
)
{
// Check PBC in current grid dimension
if
(
!
ingrid
->
isPeriodic
(
i
)
)
ft_bins
[
i
]
++
;
// Compute k-grid extents
double
dmin
,
dmax
;
Tools
::
convert
(
ft_min
[
i
],
dmin
);
Tools
::
convert
(
ft_max
[
i
],
dmax
);
// We want to have the min of k-grid at point (0,0)
dmin
=
0.0
;
dmax
=
2.0
*
pi
*
ft_bins
[
i
]
/
(
ingrid
->
getGridExtent
(
i
)
);
Tools
::
convert
(
dmin
,
ft_min
[
i
]);
Tools
::
convert
(
dmax
,
ft_max
[
i
]);
}
// This is the actual setup of the k-grid
mygrid
->
setBounds
(
ft_min
,
ft_max
,
ft_bins
,
ft_spacing
);
resizeFunctions
();
// *** CHECK CORRECT k-GRID BOUNDARIES ***
//log<<"Real grid boundaries: \n"
...
...
@@ -206,8 +196,6 @@ void FourierTransform::performOperations( const bool& from_update ) {
// <<" min_x: "<<ft_min[0]<<" min_y: "<<ft_min[1]<<"\n"
// <<" max_x: "<<ft_max[0]<<" max_y: "<<ft_max[1]<<"\n";
// Get the size of the input data arrays (to allocate FFT data)
std
::
vector
<
unsigned
>
N_input_data
(
ingrid
->
getNbin
()
);
size_t
fft_dimension
=
1
;
for
(
unsigned
i
=
0
;
i
<
N_input_data
.
size
();
++
i
)
fft_dimension
*=
static_cast
<
size_t
>
(
N_input_data
[
i
]
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment