From: Martin R. <mar...@gm...> - 2011-10-25 01:24:26
|
Dear List, I'm a newbie when it comes to python, so I might have missed something trivial. I've followed the "tutorial" by the letter, and am trying to perform an MPA (and Löwdin=LPA?) on one of the testfiles (dvb_un_sp.out in basicGaussian03, and others), but it fails. I have run the testscript, and everything seems to check out there. I have also tried the same on other testfiles (both from g03 and g09),which had the following input: #p gfinput iop(6/7=3) iop(3/33=1,3/36=-1) pop=full rb3lyp/6-31+g(d,p), with the same results. Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from cclib.parser import Gaussian >>> from cclib.method import MPA >>> parser=Gaussian("dvb_un_sp.out") >>> analysis=MPA(parser) >>> analysis.calculate() [MPA Gaussian log file dvb_un_sp.out ERROR] Missing mocoeffs False >>> Very thankful for any help. Martin |
From: Noel O'B. <bao...@gm...> - 2011-10-25 11:08:24
|
---------- Forwarded message ---------- From: Adam Tenderholt <ate...@gm...> Date: 25 October 2011 06:31 Subject: Fwd: [cclib-users] How to do Population analysis To: Noel O'Boyle <bao...@gm...>, "Karol M. Langner" <kar...@gm...> I replied, cc'ing the cclib-users list, but it got rejected. The wiki probably hasn't been updated since Karol's refactoring. I think Martin's problem is missing data = parser.parse() and passing the data object to the MPA constructor. Take care, Adam |
From: Karol M. L. <kar...@gm...> - 2011-10-28 13:09:31
|
Wiki is now updated on that particular page. '- Karol On Oct 25 2011, Noel O'Boyle wrote: > ---------- Forwarded message ---------- > From: Adam Tenderholt <ate...@gm...> > Date: 25 October 2011 06:31 > Subject: Fwd: [cclib-users] How to do Population analysis > To: Noel O'Boyle <bao...@gm...>, "Karol M. Langner" > <kar...@gm...> > > I replied, cc'ing the cclib-users list, but it got rejected. > > The wiki probably hasn't been updated since Karol's refactoring. I > think Martin's problem is missing data = parser.parse() and passing > the data object to the MPA constructor. > > Take care, > > Adam > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > _______________________________________________ > cclib-users mailing list > ccl...@li... > https://lists.sourceforge.net/lists/listinfo/cclib-users -- written by Karol M. Langner Fri Oct 28 15:09:06 CEST 2011 |
From: Adam T. <ate...@gm...> - 2011-10-27 14:44:09
Attachments:
H20_sp_STO3G.xls
|
Hi Martin, I don't quite understand how you reformatted your cclib output. I went ahead ran your logfile through cclib: parser = ccopen("H20_sp_STO3G.log") data = parser.parse() method = MPA(data) method.calculate() numpy.savetxt("H20_sp_STO3G.csv",method.aoresults[0]) #it's a restricted calc, so save "first" element Attached is a spreadsheet with those values, along with the orbital occupations (i.e. for each atomic "orbital", sum from MO 1 through the HOMO, and multiply by 2). I get the same values as the Gaussian output file. Hope that helps, and let me know if you have any further questions/problems. Take care, Adam |
From: Karol M. L. <kar...@gm...> - 2011-10-27 16:46:30
|
Hi all, Adam is right, you can get orbital occupations by summing the appropriate atomic orbital contributions, which are stored in aoresults after doing the calculation. it goes like this in the interpretor: >>> import cclib >>> d = cclib.parser.ccopen("H20_sp_STO3G.log").parse() (...) >>> m = cclib.method.MPA(d) >>> m.calculate() (...) >>> 2*m.aoresults[0][:d.homos[0]+1].sum(axis=0) array([ 1.99731828, 1.84988399, 2. , 1.06865696, 1.44716636, 0.81846894, 0.81846894]) and there you have the same number that Gaussian prints. Note that I just did d.homos[0] to get the index of the HOMO automatically. I suppose you were looking at the fragment charge contributions from MOs: >>> m.fragresults [array([[ 1.00083418e+00, -4.19328593e-04, -4.19328593e-04], [ 7.84491789e-01, 1.07751544e-01, 1.07751544e-01], [ 5.34328481e-01, 2.32831101e-01, 2.32831101e-01], [ 8.61858340e-01, 6.90711521e-02, 6.90711521e-02], [ 1.00000000e+00, 0.00000000e+00, 0.00000000e+00], [ 3.52808101e-01, 3.23597395e-01, 3.23597395e-01], [ 4.65660941e-01, 2.67165641e-01, 2.67165641e-01]])] where I see the number you had in you email, but this is a different thing than the orbital occupotion. It is the contribution of MOs to the charge of particular fragments. Hope this helps, Karol On Oct 27 2011, Adam Tenderholt wrote: > Hi Martin, > > I don't quite understand how you reformatted your cclib output. I went ahead ran your logfile through cclib: > > parser = ccopen("H20_sp_STO3G.log") > data = parser.parse() > method = MPA(data) > method.calculate() > numpy.savetxt("H20_sp_STO3G.csv",method.aoresults[0]) #it's a restricted calc, so save "first" element > > Attached is a spreadsheet with those values, along with the orbital occupations (i.e. for each atomic "orbital", sum from MO 1 through the HOMO, and multiply by 2). I get the same values as the Gaussian output file. > > Hope that helps, and let me know if you have any further questions/problems. > > Take care, > > Adam > > > > On Oct 25, 2011, at 3:53 PM, Martin Rahm wrote: > > > Thank you Adam, > > > > That worked like a charm. However, as I ran a trial run on H2O with a STO-3G basis set (attached), I noticed that even though the MPA of cclib generates the exact same atomic charges as MPA of Gaussian09, the occupation of the p-electrons does not match! > > > > The results from g09 are: > > > > Gross orbital populations: > > 1 1 O 1S 1.99733 > > 2 2S 1.84988 > > 3 2PX 2.00000 > > 4 2PY 1.06867 > > 5 2PZ 1.44717 > > 6 2 H 1S 0.81848 > > 7 3 H 1S 0.81848 > > > > Whereas cclib generates (I reformated the output to that below): > > > > O H H > > 1S 1.001 0.000 0.000 > > 2S 0.784 0.108 0.108 > > P 0.534 0.233 0.233 > > P 0.862 0.069 0.069 > > P 1.000 0.000 0.000 > > S 0.353 0.324 0.324 > > S 0.466 0.267 0.267 > > > > which multiplied by two gives > > > > P 1.069 > > P 1.724 > > P 2.000 > > > > Thus, the contribution from one p-orbital (they also seem to have switched order) is different between g09 and cclib. Overall 57.3% p-character in cclib, and 54.0% in g09. > > > > Does anyone have any explanation to this? Also is there a neat way of keeping track of which number in the result array that corresponds to which type of AO? (I had a very small list of AOs and pasted them next to the list from the G09 output, but one p-AO had still changed place) > > > > Many thanks, > > Martin > > > > > > On Tue, Oct 25, 2011 at 4:08 AM, Noel O'Boyle <bao...@gm...> wrote: > > > ---------- Forwarded message ---------- > > > From: Adam Tenderholt <ate...@gm...> > > > Date: 25 October 2011 06:31 > > > Subject: Fwd: [cclib-users] How to do Population analysis > > > To: Noel O'Boyle <bao...@gm...>, "Karol M. Langner" > > > <kar...@gm...> > > > > > > I replied, cc'ing the cclib-users list, but it got rejected. > > > > > > The wiki probably hasn't been updated since Karol's refactoring. I > > > think Martin's problem is missing data = parser.parse() and passing > > > the data object to the MPA constructor. > > > > > > Take care, > > > > > > Adam > > > > > > ------------------------------------------------------------------------------ > > > The demand for IT networking professionals continues to grow, and the > > > demand for specialized networking skills is growing even more rapidly. > > > Take a complimentary Learning@Cisco Self-Assessment and learn > > > about Cisco certifications, training, and career opportunities. > > > http://p.sf.net/sfu/cisco-dev2dev > > > _______________________________________________ > > > cclib-users mailing list > > > ccl...@li... > > > https://lists.sourceforge.net/lists/listinfo/cclib-users > > > > > > > <H20_sp_STO3G.log>------------------------------------------------------------------------------ > > The demand for IT networking professionals continues to grow, and the > > demand for specialized networking skills is growing even more rapidly. > > Take a complimentary Learning@Cisco Self-Assessment and learn > > about Cisco certifications, training, and career opportunities. > > http://p.sf.net/sfu/cisco-dev2dev_______________________________________________ > > cclib-users mailing list > > ccl...@li... > > https://lists.sourceforge.net/lists/listinfo/cclib-users > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > _______________________________________________ > cclib-users mailing list > ccl...@li... > https://lists.sourceforge.net/lists/listinfo/cclib-users -- written by Karol Langner Thu Oct 27 18:39:41 CEST 2011 |