| 54 |
|
const std::string& filename, |
| 55 |
|
const std::string& sele1, |
| 56 |
|
int nbins) |
| 57 |
< |
: StaticAnalyser(info, filename), selectionScript1_(sele1), |
| 58 |
< |
evaluator1_(info), seleMan1_(info), nBins_(nbins), info_(info) { |
| 57 |
> |
: StaticAnalyser(info, filename), info_(info), |
| 58 |
> |
selectionScript1_(sele1), seleMan1_(info_), evaluator1_(info_), |
| 59 |
> |
nBins_(nbins) { |
| 60 |
|
|
| 61 |
|
setOutputName(getPrefix(filename) + ".freqs"); |
| 62 |
|
|
| 101 |
|
|
| 102 |
|
EF_ = V3Zero; |
| 103 |
|
|
| 104 |
< |
if (info_->getSimParams()->haveElectricField()) |
| 105 |
< |
EF_ = info_->getSimParams()->getElectricField(); |
| 104 |
> |
std::vector<RealType> ef; |
| 105 |
> |
bool efSpec = false; |
| 106 |
|
|
| 107 |
+ |
if (info_->getSimParams()->haveElectricField()) { |
| 108 |
+ |
efSpec = true; |
| 109 |
+ |
ef = info_->getSimParams()->getElectricField(); |
| 110 |
+ |
} |
| 111 |
+ |
if (info_->getSimParams()->haveUniformField()) { |
| 112 |
+ |
efSpec = true; |
| 113 |
+ |
ef = info_->getSimParams()->getUniformField(); |
| 114 |
+ |
} |
| 115 |
+ |
if (efSpec) { |
| 116 |
+ |
if (ef.size() != 3) { |
| 117 |
+ |
sprintf(painCave.errMsg, |
| 118 |
+ |
"NitrileFrequencyMap: Incorrect number of parameters specified for uniformField.\n" |
| 119 |
+ |
"\tthere should be 3 parameters, but %lu were specified.\n", ef.size()); |
| 120 |
+ |
painCave.isFatal = 1; |
| 121 |
+ |
simError(); |
| 122 |
+ |
} |
| 123 |
+ |
EF_.x() = ef[0]; |
| 124 |
+ |
EF_.y() = ef[1]; |
| 125 |
+ |
EF_.z() = ef[2]; |
| 126 |
+ |
} |
| 127 |
+ |
|
| 128 |
|
excludesForAtom.clear(); |
| 129 |
|
excludesForAtom.resize(nAtoms); |
| 130 |
|
|
| 163 |
|
Atom* atom2; |
| 164 |
|
StuntDouble* sd1; |
| 165 |
|
int ii, sdID, molID, sdID2; |
| 166 |
< |
RealType li; |
| 166 |
> |
RealType li(0.0); |
| 167 |
|
RealType sPot, s1, s2; |
| 168 |
|
RealType freqShift; |
| 169 |
|
std::string name; |
| 227 |
|
|
| 228 |
|
sPot = sd1->getSitePotential(); |
| 229 |
|
|
| 230 |
< |
// Subtract out the contribution from every other site on this molecule: |
| 230 |
> |
// Subtract out the contribution from every other site on this |
| 231 |
> |
// molecule: |
| 232 |
|
for(atom2 = mol->beginAtom(ai2); atom2 != NULL; |
| 233 |
|
atom2 = mol->nextAtom(ai2)) { |
| 234 |
|
|