code: private double  normScore(double score, double rmsd, int optLen, int r)
  	{
  		//double        score1 = modScore(score, r);
  		double  score1 = score;
  		if(r > 0)       score1 /= Math.sqrt(r + 1);
  		//it is tested that flexible score is more linear relevant to 1/r2 than 1/r
  		if(rmsd < 0.5)  score1 *= Math.sqrt((optLen) / 0.5);
  		else    score1 *= Math.sqrt((optLen) / rmsd);
  		return score1;
  	}
docs: the chaining score is normalized by rmsd, twist and optimal alignment length