<![CDATA[Multiwfn forum / possible bug in LEA QAMS surface properties of each atom]]> - //www.umsyar.com/wfnbbs/viewtopic.php?id=1609 Tue, 11 Feb 2025 09:24:36 +0000 FluxBB <![CDATA[Re: possible bug in LEA QAMS surface properties of each atom]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=4895#p4895 Thanks! I was about to suggest the common trick of adding some small quantity to the denominator:

fragsurvar=fragsurvar/(fragsurarea+0.000000000000001)

But your solution will definitely be more stable and less sensitive to numeric errors!

]]>
Tue, 11 Feb 2025 09:24:36 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=4895#p4895
<![CDATA[Re: possible bug in LEA QAMS surface properties of each atom]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=4894#p4894 Thank you for your report. This piece of code should be changed to

		fragsurvar(:,2:3)=fragsurvar(:,2:3)/fragsurarea(:,2:3)
 		do ifrag=1,nsurfrag
			if (fragsurarea(ifrag,2)>0) fragsurvar(ifrag,1)=fragsurvar(ifrag,1)+fragsurvar(ifrag,2)
			if (fragsurarea(ifrag,3)>0) fragsurvar(ifrag,1)=fragsurvar(ifrag,1)+fragsurvar(ifrag,3)
 		end do

This issue will be fixed in the next update of Multiwfn.

]]>
Tue, 11 Feb 2025 02:42:19 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=4894#p4894
<![CDATA[Re: possible bug in LEA QAMS surface properties of each atom]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=4892#p4892 Hi again... I opened the code and found these two lines in surfana.f90 file:

        fragsurvar=fragsurvar/fragsurarea
        fragsurvar(:,1)=fragsurvar(:,2)+fragsurvar(:,3)

¿Could this be that "fragsurarea" is 0 for positive values (the surface area corresponding to positive values of the LEA is zero, since LEA is negative everywhere, so fragsurvar is NaN for positive values, and accordingly the first element of the vector is also NaN since it is calculated by the sume in the second instruction? Maybe for LEA the second instruction should be changed to:

        fragsurvar(:,1)=fragsurvar(:,3)

or even an if..else could be used to determine wether to use one or the other alternative depending on NaN values in fragsurvar(:,2)...

]]>
Mon, 10 Feb 2025 12:35:38 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=4892#p4892
<![CDATA[possible bug in LEA QAMS surface properties of each atom]]> //www.umsyar.com/wfnbbs/viewtopic.php?pid=4891#p4891 analysing the LEA of each atom surface using QAMS (sequence of options: 12 2 4 0 11) I obtained results like this:

Note: Average and variance below are in eV and eV^2 respectively
  Atom#    All/Positive/Negative average       All/Positive/Negative variance
      3   -36.41248        NaN  -36.41248           NaN        NaN   24.17663
      4   -36.25866        NaN  -36.25866           NaN        NaN   21.78491
      5   -35.78661        NaN  -35.78661           NaN        NaN   23.29892
      6   -35.81292        NaN  -35.81292           NaN        NaN   23.65038
     12   -22.13457        NaN  -22.13457           NaN        NaN    8.27424
     13   -21.98016        NaN  -21.98016           NaN        NaN   14.85794


While I find reasonable the results in the first 3 columns (basically, the "positive" values are all NaN and not used in calculating the average, so the average of all values and of negative values are identical), I wonder if the other 3 columns are correct. I would expect a similar result than with the others: NAN for "positive", and therefore identical variance considering all points or only negative points. Could this be a problem and the "All variance" column should also match the "Negative variance" column?

Thanks

Luis

]]>
Mon, 10 Feb 2025 08:33:39 +0000 //www.umsyar.com/wfnbbs/viewtopic.php?pid=4891#p4891