--- trunk/src/applications/sequentialProps/ContactAngle2.cpp 2014/11/04 20:16:29 2037 +++ trunk/src/applications/sequentialProps/ContactAngle2.cpp 2014/11/06 14:31:32 2039 @@ -54,10 +54,12 @@ namespace OpenMD { ContactAngle2::ContactAngle2(SimInfo* info, const std::string& filename, const std::string& sele, RealType solidZ, - RealType threshDens, int nrbins, int nzbins) + RealType threshDens, RealType bufferLength, + int nrbins, int nzbins) : SequentialAnalyzer(info, filename), selectionScript_(sele), evaluator_(info), seleMan_(info), solidZ_(solidZ), - threshDens_(threshDens), nRBins_(nrbins), nZBins_(nzbins) { + threshDens_(threshDens), bufferLength_(bufferLength), + nRBins_(nrbins), nZBins_(nzbins) { setOutputName(getPrefix(filename) + ".ca2"); @@ -169,7 +171,10 @@ namespace OpenMD { Vector point; point[0] = dr*(rloc+0.5); point[1] = thez; - points.push_back( point ); + + if (thez > bufferLength_) { + points.push_back( point ); + } } } @@ -284,12 +289,7 @@ namespace OpenMD { if (fabs(zCen) > rDrop) { ca = 180.0; } else { - - if (zCen >= 0.0) { - ca = 90.0 + asin(zCen/rDrop)*(180.0/M_PI); - } else { - ca = 90 - asin(zCen/rDrop)*(180.0/M_PI); - } + ca = 90.0 + asin(zCen/rDrop)*(180.0/M_PI); } values_.push_back( ca );