Commit 2af7f1b4 authored by Saurabh Belsare's avatar Saurabh Belsare
Browse files

Removed unnecessary functions and variables which were redundant/already commented out

parent 16166939
......@@ -332,10 +332,10 @@ public:
void getInducedDipoles(Context& context, std::vector<Vec3>& dipoles);
/**
* Get the total dipole moments of all particles.
* Get the total dipole moments (fixed plus induced) of all particles.
*
* @param context the Context for which to get the induced dipoles
* @param[out] dipoles the induced dipole moment of particle i is stored into the i'th element
* @param context the Context for which to get the total dipoles
* @param[out] dipoles the total dipole moment of particle i is stored into the i'th element
*/
void getTotalDipoles(Context& context, std::vector<Vec3>& dipoles);
......
......@@ -1822,34 +1822,34 @@ void CudaCalcAmoebaMultipoleForceKernel::getTotalDipoles(ContextImpl& context, v
vector<double4> posqVec;
vector<double> labDipoleVec;
vector<double> inducedDipoleVec;
vector<double> totalDipoleVecX(numParticles);
vector<double> totalDipoleVecY(numParticles);
vector<double> totalDipoleVecZ(numParticles);
double totalDipoleVecX;
double totalDipoleVecY;
double totalDipoleVecZ;
inducedDipole->download(inducedDipoleVec);
labFrameDipoles->download(labDipoleVec);
cu.getPosq().download(posqVec);
for (int i = 0; i < numParticles; i++) {
totalDipoleVecX[i] = posqVec[i].x * posqVec[i].w + labDipoleVec[3*i] + inducedDipoleVec[3*i];
totalDipoleVecY[i] = posqVec[i].y * posqVec[i].w + labDipoleVec[3*i+1] + inducedDipoleVec[3*i+1];
totalDipoleVecZ[i] = posqVec[i].z * posqVec[i].w + labDipoleVec[3*i+2] + inducedDipoleVec[3*i+2];
dipoles[order[i]] = Vec3(totalDipoleVecX[i], totalDipoleVecY[i], totalDipoleVecZ[i]);
totalDipoleVecX = posqVec[i].x * posqVec[i].w + labDipoleVec[3*i] + inducedDipoleVec[3*i];
totalDipoleVecY = posqVec[i].y * posqVec[i].w + labDipoleVec[3*i+1] + inducedDipoleVec[3*i+1];
totalDipoleVecZ = posqVec[i].z * posqVec[i].w + labDipoleVec[3*i+2] + inducedDipoleVec[3*i+2];
dipoles[order[i]] = Vec3(totalDipoleVecX, totalDipoleVecY, totalDipoleVecZ);
}
}
else {
vector<float4> posqVec;
vector<float> labDipoleVec;
vector<float> inducedDipoleVec;
vector<float> totalDipoleVecX(numParticles);
vector<float> totalDipoleVecY(numParticles);
vector<float> totalDipoleVecZ(numParticles);
float totalDipoleVecX;
float totalDipoleVecY;
float totalDipoleVecZ;
inducedDipole->download(inducedDipoleVec);
labFrameDipoles->download(labDipoleVec);
cu.getPosq().download(posqVec);
for (int i = 0; i < numParticles; i++) {
totalDipoleVecX[i] = posqVec[i].x * posqVec[i].w + labDipoleVec[3*i] + inducedDipoleVec[3*i];
totalDipoleVecY[i] = posqVec[i].y * posqVec[i].w + labDipoleVec[3*i+1] + inducedDipoleVec[3*i+1];
totalDipoleVecZ[i] = posqVec[i].z * posqVec[i].w + labDipoleVec[3*i+2] + inducedDipoleVec[3*i+2];
dipoles[order[i]] = Vec3(totalDipoleVecX[i], totalDipoleVecY[i], totalDipoleVecZ[i]);
totalDipoleVecX = posqVec[i].x * posqVec[i].w + labDipoleVec[3*i] + inducedDipoleVec[3*i];
totalDipoleVecY = posqVec[i].y * posqVec[i].w + labDipoleVec[3*i+1] + inducedDipoleVec[3*i+1];
totalDipoleVecZ = posqVec[i].z * posqVec[i].w + labDipoleVec[3*i+2] + inducedDipoleVec[3*i+2];
dipoles[order[i]] = Vec3(totalDipoleVecX, totalDipoleVecY, totalDipoleVecZ);
}
}
}
......
......@@ -647,21 +647,6 @@ void AmoebaReferenceMultipoleForce::applyRotationMatrix(vector<MultipoleParticle
}
}
//void AmoebaReferenceMultipoleForce::applyRotationMatrixPublic(vector<MultipoleParticleData>& particleData,
// const vector<int>& multipoleAtomXs,
// const vector<int>& multipoleAtomYs,
// const vector<int>& multipoleAtomZs,
// const vector<int>& axisTypes) const
//{
//
// for (unsigned int ii = 0; ii < _numParticles; ii++) {
// if (multipoleAtomZs[ii] >= 0 && multipoleAtomXs[ii] >= 0) {
// applyRotationMatrixToParticle(particleData[ii], particleData[multipoleAtomZs[ii]], particleData[multipoleAtomXs[ii]],
// multipoleAtomYs[ii] > -1 ? &particleData[multipoleAtomYs[ii]] : NULL, axisTypes[ii]);
// }
// }
//}
void AmoebaReferenceMultipoleForce::getAndScaleInverseRs(RealOpenMM dampI, RealOpenMM dampJ,
RealOpenMM tholeI, RealOpenMM tholeJ,
RealOpenMM r, vector<RealOpenMM>& rrI) const
......
......@@ -674,13 +674,6 @@ protected:
RealOpenMM quadrupole[6];
RealVec sphericalDipole;
RealOpenMM sphericalQuadrupole[5];
RealOpenMM thole;
RealOpenMM dampingFactor;
RealOpenMM polarity;
std::vector<RealOpenMM> xDipoleTraj;
std::vector<RealOpenMM> yDipoleTraj;
std::vector<RealOpenMM> zDipoleTraj;
};
/**
......@@ -720,10 +713,6 @@ protected:
RealOpenMM _uScale[5];
std::vector<TransformedMultipole> _transformed;
std::vector<RealVec> _fixedMultipoleField;
std::vector<RealVec> _fixedMultipoleFieldPolar;
std::vector<RealVec> _inducedDipole;
std::vector<RealVec> _labFramePermanentDipole;
std::vector<RealVec> _inducedDipolePolar;
int _mutualInducedDipoleConverged;
......@@ -1048,13 +1037,6 @@ protected:
*/
virtual void calculateInducedDipoles(const std::vector<MultipoleParticleData>& particleData);
/*
* Calculate permanent dipoles rotated in the lab frame.
*
* @param particleData vector of particle positions and parameters (charge, labFrame dipoles, quadrupoles, ...)
*/
// virtual void calculateLabFramePermanentDipoles(const std::vector<MultipoleParticleData>& particleData);
/**
* Setup:
* if needed invert multipole moments at chiral centers
......@@ -1303,13 +1285,6 @@ private:
*/
void calculateInducedDipoles(const std::vector<MultipoleParticleData>& particleData);
/*
* Calculate fixed dipoles rotated in the lab frame.
*
* @param particleData vector of particle positions and parameters (charge, labFrame dipoles, quadrupoles, ...)
*/
// void calculateLabFramePermanentDipoles(const std::vector<MultipoleParticleData>& particleData);
/**
* Calculate fields due induced dipoles at each site.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment