Skip to content
Snippets Groups Projects
Commit 5a12d49c authored by MoleOrbitalHybridAnalyst's avatar MoleOrbitalHybridAnalyst Committed by Carlo Camilloni
Browse files

fixed derivatives in CoordinationNumbers (#471)

I verified it, I will then modified a regtest so to keep checking for this
parent 5d23c354
No related branches found
No related tags found
No related merge requests found
......@@ -170,8 +170,8 @@ double CoordinationNumbers::compute( const unsigned& tindex, AtomValuePack& myat
if(r_power > 0) {
d = sqrt(d2); raised = pow( d, r_power - 1 );
accumulateSymmetryFunction( 1, i, sw * raised * d,
(dfunc * d * raised + sw * r_power) * distance,
(-dfunc * d * raised - sw * r_power) * Tensor(distance, distance),
(dfunc * d * raised + sw * r_power * raised / d) * distance,
(-dfunc * d * raised - sw * r_power * raised / d) * Tensor(distance, distance),
myatoms );
} else {
accumulateSymmetryFunction( 1, i, sw, (dfunc)*distance, (-dfunc)*Tensor(distance,distance), myatoms );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment