Changeset b6f776


Ignore:
Timestamp:
Oct 9, 2016, 9:19:14 PM (9 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Add_FitFragmentPartialChargesAction, Fix_ChargeSampling_PBC, Fix_FitPartialCharges
Children:
4d08b7
Parents:
dfd0f7
git-author:
Frederik Heber <heber@…> (10/09/16 21:19:12)
git-committer:
Frederik Heber <heber@…> (10/09/16 21:19:14)
Message:

FIX: PartialNucleiChargeFitter needs to reconstruct matrix after SVD.

  • SVD overwrites original matrix and this causes the residuum to be calculated wrong.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Potentials/PartialNucleiChargeFitter.cpp

    rdfd0f7 rb6f776  
    325325//  LOG(4, "DEBUG: Solution vector is " << (*PotentialFromCharges) * (*PartialCharges) << ".");
    326326
     327  LOG(2, "DEBUG: Norm of right-hand side is " << SampledPotential.Norm());
     328
     329  // need to reconstruct matrix as it was overwritten by SVD
     330  constructMatrix();
     331
    327332  // calculate residual vector
    328333  VectorContent residuum = (*PotentialFromCharges) * (*PartialCharges) - SampledPotential;
     
    366371void PartialNucleiChargeFitter::writeMatrix()
    367372{
    368   constructMatrix();
     373  // only construct if not yet present
     374  if (PotentialFromCharges == NULL)
     375    constructMatrix();
    369376
    370377  // write matrix as paraview csv file file
Note: See TracChangeset for help on using the changeset viewer.