-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean up ewald, remove dependency on SimulationRegion
- Loading branch information
Han Wang
committed
Mar 15, 2021
1 parent
2f3bcd6
commit 12ba87b
Showing
6 changed files
with
92 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#pragma once | ||
|
||
#include<algorithm> | ||
#include<cassert> | ||
#include<omp.h> | ||
|
||
#include "utilities.h" | ||
#include "region.h" | ||
|
||
// 8.988e9 / pc.electron_volt / pc.angstrom * (1.602e-19)**2 | ||
const double ElectrostaticConvertion = 14.39964535475696995031; | ||
|
||
template <typename VALUETYPE> | ||
struct EwaldParameters | ||
{ | ||
VALUETYPE rcut = 6.0; | ||
VALUETYPE beta = 2; | ||
VALUETYPE spacing = 4; | ||
}; | ||
|
||
// compute the reciprocal part of the Ewald sum. | ||
// outputs: energy force virial | ||
// inputs: coordinates charges region | ||
template <typename VALUETYPE> | ||
void | ||
ewald_recp( | ||
VALUETYPE & ener, | ||
std::vector<VALUETYPE> & force, | ||
std::vector<VALUETYPE> & virial, | ||
const std::vector<VALUETYPE>& coord, | ||
const std::vector<VALUETYPE>& charge, | ||
const Region<VALUETYPE>& region, | ||
const EwaldParameters<VALUETYPE>& param); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters