From fd24d147cb03cd95701ccc6017d4845c5ef142fc Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 19 Jan 2015 15:32:50 +0100 Subject: [PATCH] Documentation --- Makefile | 7 - README.md | 138 +++ resultsFile/Modules/qmcchemFile.py | 1357 ------------------------ resultsFile/Modules/qmcchem_newFile.py | 297 ------ 4 files changed, 138 insertions(+), 1661 deletions(-) delete mode 100644 Makefile delete mode 100755 resultsFile/Modules/qmcchemFile.py delete mode 100755 resultsFile/Modules/qmcchem_newFile.py diff --git a/Makefile b/Makefile deleted file mode 100644 index 010a68a..0000000 --- a/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -VERSION=1.1 -default: - - rm -rf build dist - - export VERSION=$(VERSION) ;\ - ./setup.py --quiet bdist_rpm - - sudo rpm -e resultsFile - - sudo rpm -hiv dist/resultsFile*.noarch.rpm diff --git a/README.md b/README.md index aa9866a..c6b00f3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,140 @@ # resultsFile Python interface to read output files of quantum chemistry programs + +To add a module to read a new kind of output file, just add a file +in the `Modules` directory. + + + +# Using the library + +Example (`resultsFile` is supposed to be in your `sys.path`): + +``` Python +import resultsFile + +file = resultsFile.getFile("g09_output.log") +print 'recognized as', str(file).split('.')[-1].split()[0] +print file.mo_sets + +``` + +## Constraints + +### Gaussian09 + +* `GFPRINT` : Needed to read the AO basis set +* `pop=Full` : Needed to read all the MOs +* `#p CAS(SlaterDet)` : CAS-SCI CI coefficients + +When doing a CAS with Gaussian, first do the Hartree-Fock calculation saving the checkpoint +file and then do the CAS in a second calculation. + + +### Molpro + +* `print, basis;` : Needed to read the AO basis set +* `gprint,orbital;` : Needed to read the MOs +* `gprint,civector; gthresh,printci=0.;` : Needed to read the CI coefficients +* `orbprint` : Ensures all the MOs are printed + +An RHF calculation is mandatory before any MCSCF calculation, since some +information is printed only the RHF section. Be sure to print *all* molecular +orbitals using the `orbprint` keyword, and to use the same spin multiplicity +and charge between the RHF and the CAS. + + +### GAMESS-US + +For MCSCF calculations, first compute the MCSCF single-point wave function with +the GUGA algorithm. Then, put the the MCSCF orbitals (of the `.dat` file) in +the GAMESS input file, and run a single-point GUGA CI calculation with the +following keywords: + +* `PRTTOL=0.0001` in the `$GUGDIA` group to use a threshold of 1.E-4 on the CI coefficients +* `NPRT=2` in the `$CIDRT` group to print the CSF expansions in terms of Slater determinants +* `PRTMO=.T.` in the `$GUESS` group to print the molecular orbitals + +# Debugging + +Any module can be run as an stand-alone executable. For example: + +``` +$ resultsFile/Modules/gamessFile.py + + resultsFile version 1.0, Copyright (C) 2007 Anthony SCEMAMA + resultsFile comes with ABSOLUTELY NO WARRANTY; for details see the + gpl-license file. + This is free software, and you are welcome to redistribute it + under certain conditions; for details see the gpl-license file. + +Usage: +------ + +resultsFile/Modules/gamessFile.py [options] file + +Options: +-------- + + --date : When the calculation was performed. + --version : Version of the code generating the file. + --machine : Machine where the calculation was run. + --memory : Requested memory for the calculation. + --disk : Requested disk space for the calculation. + --cpu_time : CPU time. + --author : Who ran the calculation. + --title : Title of the run. + --units : Units for the geometry (au or angstroms). + --methods : List of calculation methods. + --options : Options given in the input file. + --spin_restrict : Open-shell or closed-shell calculations. + --conv_threshs : List of convergence thresholds. + --energies : List of energies. + --one_e_energies : List of one electron energies. + --two_e_energies : List of two electron energies. + --ee_pot_energies : List of electron-electron potential energies. + --Ne_pot_energies : List of nucleus-electron potential energies. + --pot_energies : List of potential energies. + --kin_energies : List of kinetic energies. + --virials : Virial ratios. + --point_group : Symmetry used. + --num_elec : Number of electrons. + --charge : Charge of the system. + --multiplicity : Spin multiplicity of the system. + --nuclear_energy : Repulsion of the nuclei. + --dipole : Dipole moment + --geometry : Atom types and coordinates. + --basis : Basis set definition + --mo_sets : List of molecular orbitals + --mo_types : Types of molecular orbitals (canonical, natural,...) + --mulliken_mo : Mulliken atomic population in each MO. + --mulliken_ao : Mulliken atomic population in each AO. + --mulliken_atom : Mulliken atomic population. + --lowdin_ao : Lowdin atomic population in each AO. + --mulliken_atom : Mulliken atomic population. + --lowdin_atom : Lowdin atomic population. + --two_e_int_ao : Two electron integrals in AO basis + --determinants : List of Determinants + --num_alpha : Number of Alpha electrons. + --num_beta : Number of Beta electrons. + --closed_mos : Closed shell molecular orbitals + --active_mos : Active molecular orbitals + --virtual_mos : Virtual molecular orbitals + --determinants_mo_type : MO type of the determinants + --det_coefficients : Coefficients of the determinants + --csf_mo_type : MO type of the determinants + --csf_coefficients : Coefficients of the CSFs + --symmetries : Irreducible representations + --occ_num : Occupation numbers + --csf : List of Configuration State Functions + --num_states : Number of electronic states + --two_e_int_ao_filename : + --one_e_int_ao_filename : + --atom_to_ao_range : + --gradient_energy : Gradient of the Energy wrt nucl coord. + --text : + --uncontracted_basis : + --uncontracted_mo_sets : + +``` + diff --git a/resultsFile/Modules/qmcchemFile.py b/resultsFile/Modules/qmcchemFile.py deleted file mode 100755 index 5c1f552..0000000 --- a/resultsFile/Modules/qmcchemFile.py +++ /dev/null @@ -1,1357 +0,0 @@ -#!/usr/bin/python -# resultsFile is a library which allows to read output files of quantum -# chemistry codes and write input files. -# Copyright (C) 2007 Anthony SCEMAMA -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Anthony Scemama -# LCPQ - IRSAMC -# Universite Paul Sabatier -# 118, route de Narbonne -# 31062 Toulouse Cedex 4 -# scemama@irsamc.ups-tlse.fr - - - -import include -eval(include.code) - -import sys - -qmcchemFile_defined_vars = [] - -class qmcchemFile(resultsFile): - """ Class defining the QMC=Chem file. - """ - - local_vars = list(local_vars) - defined_vars = list(qmcchemFile_defined_vars) - - to_remove = [] - for i, j in local_vars: - if i in resultsFile_defined_vars: - to_remove.append( (i,j) ) - for i in to_remove: - local_vars.remove(i) - - for i, j in local_vars: - if i not in defined_vars: - exec build_get_funcs(i) in locals() - exec build_property(i,j) in locals() - del to_remove, i, j - - - -JastLink='Dets' -def qmcchem_write_qmcin(resultsFile,method='VMC',irestart=0,version=2007.1,\ - JastType='None',NumWalkers=100,NumSteps=100,NumCalcs=50,\ - TimeStep=0.001,PointsRead=False,PointsWrite=True,DriftInitMax=0.,\ - NumIter=1000, Minimize='Variance', EtaMin=0.9,\ - Theta=0, NumBlocks=100, LenBlocks=100, srmcAlgo='Sorella',\ - NumProj=100,NumStepCorr=2,Jump=1,NumTime=10,state=0,\ - Schema='Langevin',JastLink=JastLink,Adiag=0.001): - - try: - EnerRef = resultsFile.energies[-1] - except TypeError: - EnerRef = 0. - if DriftInitMax == 0.: - DriftInitMax = max(10.,abs(EnerRef)/4.) - - file = open("qmcin","w") - print >>file, "&general" - print >>file, " Irestart=",irestart - print >>file, " Version =%5.1f"%(version) - print >>file, " Method ='"+method+"'" - print >>file, "/\n" - print >>file, "=geometry_data=" - geometry = resultsFile.geometry - for at in geometry: - if resultsFile.units == 'BOHR': - print >>file, "0 %5d %16f %16f %16f 0 4"%tuple([int(at.charge)]+list(at.coord)) - else: - print >>file, "0 %5d %16f %16f %16f 0 4"%tuple([int(at.charge)]+ \ - [i/a0 for i in at.coord]) - print >>file, "=end=\n" - print >>file, "&wfunction" - print >>file, " NumAlpha =", resultsFile.num_alpha - print >>file, " NumBeta =", resultsFile.num_beta - print >>file, " JastType ='"+JastType+"'" -# print >>file, " JastLink ='"+JastLink+"'" -# print >>file, " NormMOs =", 0 - print >>file, "/\n" - print >>file, "&vmc" - print >>file, " Schema = '"+Schema+"'" - print >>file, " NumWalkers =", NumWalkers - print >>file, " LenBlocks =", NumSteps - print >>file, " NumCalcs =", NumCalcs - if Schema == 'Langevin': - TimeStep2 = 0.2 - else: - TimeStep2 = TimeStep - print >>file, " TimeStep =", TimeStep2 - print >>file, " PointsRead = ."+str(PointsRead)+"." - print >>file, " PointsWrite = ."+str(PointsWrite)+"." - print >>file, " EnerRef =", EnerRef - print >>file, " EPLF = .False." - print >>file, " DriftInitMax =", DriftInitMax - print >>file, "/\n" - print >>file, "&optimlinear" - print >>file, " Schema = '"+Schema+"'" - print >>file, " NumWalkers =", NumWalkers - print >>file, " LenBlocks =", LenBlocks - print >>file, " NumCalcs =", NumCalcs - print >>file, " TimeStep =", TimeStep2 - print >>file, " Adiag =", Adiag - print >>file, "/\n" - print >>file, "&dmc" - print >>file, " NumWalkers =", NumWalkers - print >>file, " LenBlocks =", LenBlocks - print >>file, " NumCalcs =", NumCalcs - print >>file, " TimeStep =", TimeStep - print >>file, " PointsRead = ."+str(PointsRead)+"." - print >>file, " PointsWrite = ."+str(PointsWrite)+"." - print >>file, " TimeStep =", TimeStep - print >>file, " EnerRef =", EnerRef - print >>file, " EPLF = .False." - print >>file, "/\n" -# print >>file, "&srmc" -# print >>file, " Algorithm ='"+srmcAlgo+"'" -# print >>file, " NumBlocks =", NumBlocks -# print >>file, " NumWalkers =", NumWalkers -# print >>file, " LenBlocks =", LenBlocks -# print >>file, " NumProj =", NumProj -# print >>file, " TimeStep =", TimeStep -# print >>file, " PointsRead = ."+str(PointsRead)+"." -# print >>file, " PointsWrite = ."+str(PointsWrite)+"." -# print >>file, " EnerRef =", resultsFile.energies[-1] -# print >>file, " DriftInitMax =", DriftInitMax -# print >>file, "/\n" -# print >>file, "&pdmc" -# print >>file, " NumWalkers =", NumWalkers -# print >>file, " LenBlocks =", NumSteps -# print >>file, " TimeStep =", TimeStep -# print >>file, " PointsRead = ."+str(PointsRead)+"." -# print >>file, " PointsWrite = ."+str(PointsWrite)+"." -# print >>file, " EnerRef =", resultsFile.energies[-1] -# print >>file, " DriftInitMax =", DriftInitMax -# print >>file, " NumStepCorr =", NumStepCorr -# print >>file, " Jump =", Jump -# print >>file, "/\n" -# print >>file, "&gfmc" -# print >>file, " NumBlocks =", NumBlocks -# print >>file, " NumWalkers =", NumWalkers -# print >>file, " LenBlocks =", LenBlocks -# print >>file, " NumCalcs =", NumCalcs -# print >>file, " TimeStep =", TimeStep -# print >>file, " PointsRead = ."+str(PointsRead)+"." -# print >>file, " PointsWrite = ."+str(PointsWrite)+"." -# print >>file, " EnerRef =", resultsFile.energies[-1] -# print >>file, " DriftInitMax =", DriftInitMax -# print >>file, " Theta =", Theta -# print >>file, " NumTime =", NumTime -# print >>file, "/\n" -# print >>file, "&plotorb" -# print >>file, " Idim = 1" -# print >>file, " Norb = 1" -# print >>file, " MO =", resultsFile.num_elec/2 -# print >>file, " Npoints = 20" -# print >>file, " x0=0., y0=0., z0=-5." -# print >>file, " x1=0., y1=0., z1= 5." -# print >>file, "/\n" -# print >>file, "&test" -# print >>file, " NumWalkers =", NumWalkers -# print >>file, " TimeStep =", TimeStep -# print >>file, " PointsRead = ."+str(PointsRead)+"." -# print >>file, " PointsWrite = ."+str(PointsWrite)+"." -# print >>file, " Theta =", Theta -# print >>file, "/\n" - -def qmcchem_write_qmc_det(resultsFile,MO_type=None,state=0,det_thr=0., \ - Slater=False,FitCusp=True): - if MO_type is None: - MO_type = resultsFile.determinants_mo_type - try: - MO_set = resultsFile.mo_sets[MO_type] - except KeyError: - print "MO type "+MO_type+" not present in "+resultsFile.filename - return - file = open('qmc.det','w') - print >>file, "=jastrow_per_determinant=" - print >>file, " (ALL,1)" - print >>file, "=end=\n" - print >>file, "=mos_det_data=" - MOindices = resultsFile.closed_mos + resultsFile.active_mos - NumMOs = len(MOindices) - MOs = [] - for i in MOindices: - MOs.append(MO_set[i]) - if Slater: - nslater = 0 - eigthr = [ MOs[i].eigenvalue for i in range(NumMOs) ] - eigthr.sort() - eigthr = eigthr[len(resultsFile.geometry)-1] - - for i in range(NumMOs): - if Slater and MOs[i].eigenvalue <= eigthr: - print >>file, i+1, 'Slater '+str(nslater+1)+' '+ \ - resultsFile.geometry[nslater].name[0]+'1s' - nslater += 1 - else: - if FitCusp: - print >>file, i+1, 'FitCusp 0.2' - else: - print >>file, i+1, 'Gaussian' - print >>file, "=end=\n" - print >>file, "=psi_data=" - NumAlpha = resultsFile.num_alpha - NumBeta = resultsFile.num_beta - for orb0 in resultsFile.closed_mos: -# print >>file, '('+str(MOindices.index(orb0)+1)+',0) ', - print >>file, str(MOindices.index(orb0)+1)+' ', - print >>file, '\n', - MyList = [] - for i,j in zip(resultsFile.det_coefficients[state],\ - resultsFile.determinants): - MyList.append((-abs(i),i,j)) - MyList.sort() - if det_thr >= 1.: - det_thr = MyList[0][1] -# if det_thr > abs(MyList[0][1]): -# det_thr = abs(MyList[0][1]) - for bid, detcoef, det in MyList: - if abs(detcoef) >= det_thr: - print >>file, "0", detcoef - for orb0 in det['alpha']: - if orb0 in resultsFile.active_mos: -# print >>file, '('+str(MOindices.index(orb0)+1)+',0) ', - print >>file, str(MOindices.index(orb0)+1)+' ', - print >>file, '\n', - for orb0 in det['beta']: - if orb0 in resultsFile.active_mos: -# print >>file, '('+str(MOindices.index(orb0)+1)+',0) ', - print >>file, str(MOindices.index(orb0)+1)+' ', - print >>file, '\n', - print >>file, "=end=\n" - file.close() - -def qmcchem_write_qmc_mos(resultsFile,MO_type=None,thresh=0.): - if MO_type is None: - MO_type = resultsFile.determinants_mo_type - try: - allMOs = resultsFile.uncontracted_mo_sets[MO_type] - except KeyError: - print "MO type not present in "+resultsFile.filename - return - file = open('qmc.mos', 'w') - print >>file, "=mos_data=" - MOindices = resultsFile.closed_mos + resultsFile.active_mos+ resultsFile.virtual_mos - NumMOs = len(MOindices) - MOs = [] - for i in MOindices: - MOs.append(allMOs[i]) - for i in range(NumMOs): - to_print = [] - for idx,j in enumerate(MOs[i].vector): - if abs(j) > thresh: - buffer = "0 %d %20.10f\n"%(idx+1,j) - to_print.append(buffer) - buffer = " %d %d ! %f\n"%(i+1,len(to_print),MOs[i].eigenvalue) - to_print.insert(0,buffer) - file.writelines(to_print) - print >>file, "=end=" - file.close() - -def sort_xyz(s): - l = list(s) - l.sort() - result = "" - for i in l: - result += i - return result - -def qmcchem_write_qmc_basis(resultsFile): - basis = resultsFile.uncontracted_basis - geom = resultsFile.geometry - file = open('qmc.basis', 'w') - print >>file, "=ao_basis=" - for prim in basis: - c = prim.center - for i,atom in enumerate(geom): - atom_c = atom.coord - if atom_c == c: - atom_id = i+1 - sym = prim.sym - print >>file, "%3d %s %f"%(atom_id, sym, prim.expo) - print >>file, "=end=" - file.close() - -def qmcchem_write_qmc_aos(): - file = open('qmc.aos', 'w') - print >>file, "=ao_slater=" - print >>file, "=end=" - file.close() - -def qmcchem_write_qmc_jast_det(resultsFile): - - file = open('qmc.jast_det','w') - print >>file, "=jast_det_data=" - print >>file, 1 - nparm = (4+len(resultsFile.geometry)) - for i in xrange (nparm): - print >>file, 0, 0. - print >>file, "=end=" - file.close() - - file = open('qmc.jast_det.general','w') - print >>file, "=jast_det_data=" - print >>file, 1 - nparm = (19+9*len(resultsFile.geometry)) - for i in xrange (nparm): - print >>file, 0, 0. - print >>file, "=end=" - file.close() - -def qmcchem_write_qmc_seed(): - file = open("qmc.seed","w") - print >>file, """=random_seed= -1 - 1 123456789 123223945 - 2 744725 23082440 - 3 96136469 236392769 - 4 141196565 165692149 - 5 135925013 158284772 - 6 80321813 164064526 - 7 242822421 3950450 - 8 86555925 175193106 - 9 148393237 240761836 - 10 159898901 171522049 - 11 121072917 77799761 - 12 31915285 209381596 - 13 160861461 150208417 - 14 239475989 160552609 - 15 267758869 103276252 - 16 245710101 249137490 - 17 173329685 203048707 - 18 50617621 246253807 - 19 146009365 262586389 - 20 191069461 6905206 - 21 185797909 178835986 - 22 130194709 6852329 - 23 24259861 201065723 - 24 136428821 435527 - 25 198266133 125558990 - 26 209771797 94316688 - 27 170945813 100920717 - 28 81788181 210608325 - 29 210734357 91206455 - 30 20913429 86873573 - 31 49196309 144357837 - 32 27147541 81432560 - 33 223202581 123767117 - 34 100490517 99620582 - 35 195882261 245148089 - 36 240942357 130659015 - 37 235670805 2794256 - 38 180067605 247655316 - 39 74132757 48627027 - 40 186301717 70732108 - 41 248139029 44712064 - 42 259644693 109204463 - 43 220818709 5436569 - 44 131661077 150967166 - 45 260607253 29073821 - 46 70786325 67801080 - 47 99069205 29347725 - 48 77020437 83808605 - 49 4640021 3868264 - 50 150363413 238542765 - 51 245755157 34131501 - 52 22379797 118571753 - 53 17108245 17084127 - 54 229940501 199656207 - 55 124005653 201994363 - 56 236174613 236136481 - 57 29576469 116710147 - 58 41082133 66239007 - 59 2256149 178271862 - 60 181533973 148947207 - 61 42044693 82299604 - 62 120659221 221824219 - 63 148942101 145170461 - 64 126893333 106319258 - 65 54512917 230276690 - 66 200236309 244638532 - 67 27192597 16461170 - 68 72252693 89132506 - 69 66981141 71759229 - 70 11377941 249779547 - 71 173878549 242785907 - 72 17612053 78266823 - 73 79449365 191606869 - 74 90955029 83909406 - 75 52129045 201044770 - 76 231406869 54602080 - 77 91917589 100937434 - 78 170532117 130561166 - 79 198814997 73444221 - 80 176766229 267453607 - 81 104385813 116175116 - 82 250109205 236396971 - 83 77065493 42190726 - 84 122125589 160830363 - 85 116854037 16873195 - 86 61250837 248078966 - 87 223751445 21055291 - 88 67484949 252483132 - 89 129322261 119455863 - 90 140827925 12269293 - 91 102001941 192244382 - 92 12844309 254856330 - 93 141790485 203476400 - 94 220405013 180936465 - 95 248687893 201093549 - 96 226639125 148829828 - 97 154258709 48488086 - 98 31546645 63871715 - 99 126938389 229809258 - 100 171998485 183718956 - 101 166726933 239350569 - 102 111123733 44608097 - 103 5188885 192162516 - 104 117357845 71968129 - 105 179195157 18746217 - 106 190700821 238243212 - 107 151874837 1924330 - 108 62717205 62892675 - 109 191663381 239970134 - 110 1842453 223003749 - 111 30125333 109736622 - 112 8076565 137372466 - 113 204131605 145704688 - 114 81419541 113987306 - 115 176811285 160934942 - 116 221871381 7851917 - 117 216599829 52374071 - 118 160996629 26291484 - 119 55061781 69290300 - 120 167230741 192081814 - 121 229068053 7967019 - 122 240573717 75013883 - 123 201747733 17009158 - 124 112590101 134071116 - 125 241536277 60472268 - 126 51715349 106816648 - 127 79998229 186297982 - 128 57949461 83135151 - 129 254004501 257878554 - 130 131292437 236797377 - 131 226684181 222492322 - 132 3308821 20153791 - 133 266472725 111303701 - 134 210869525 43182759 - 135 104934677 39363188 - 136 217103637 194442363 - 137 10505493 205607358 - 138 22011157 177941307 - 139 251620629 87552498 - 140 162462997 50009829 - 141 22973717 51907347 - 142 101588245 219299707 - 143 129871125 12395806 - 144 107822357 104606972 - 145 35441941 235063317 - 146 181165333 13920104 - 147 8121621 264535031 - 148 53181717 70678208 - 149 47910165 266193092 - 150 260742421 213771010 - 151 154807573 220870268 - 152 266976533 197538864 - 153 60378389 193285408 - 154 71884053 128643658 - 155 33058069 63607983 - 156 212335893 197633358 - 157 72846613 64329001 - 158 151461141 142071102 - 159 179744021 243390094 - 160 157695253 51841561 - 161 85314837 195748063 - 162 231038229 100715487 - 163 57994517 137116699 - 164 103054613 9478801 - 165 97783061 98660418 - 166 42179861 119674414 - 167 204680469 195429716 - 168 48413973 51424950 - 169 110251285 89490258 - 170 121756949 45610025 - 171 82930965 63664699 - 172 262208789 158559879 - 173 122719509 216226319 - 174 201334037 262055377 - 175 229616917 192463566 - 176 207568149 43328006 - 177 135187733 258421881 - 178 12475669 78801703 - 179 107867413 227161871 - 180 152927509 223480114 - 181 147655957 264065680 - 182 92052757 147817513 - 183 254553365 81530620 - 184 98286869 143025163 - 185 160124181 12710996 - 186 171629845 47329496 - 187 132803861 206211735 - 188 43646229 51278481 - 189 172592405 89217477 - 190 251206933 160870708 - 191 11054357 246540767 - 192 257441045 197555395 - 193 185060629 4702947 - 194 62348565 66667838 - 195 157740309 116288723 - 196 202800405 25864867 - 197 197528853 75591598 - 198 141925653 148253940 - 199 35990805 266097525 - 200 148159765 53957680 - 201 209997077 81436710 - 202 221502741 252291159 - 203 182676757 72867267 - 204 93519125 262713706 - 205 222465301 70227019 - 206 32644373 225441640 - 207 60927253 255675327 - 208 38878485 96141905 - 209 234933525 89951261 - 210 112221461 182802981 - 211 207613205 191421799 - 212 252673301 71993060 - 213 247401749 188598172 - 214 191798549 239472783 - 215 85863701 62313149 - 216 198032661 171147045 - 217 259869973 145721032 - 218 2940181 242113191 - 219 232549653 50555839 - 220 143392021 106048275 - 221 3902741 9308578 - 222 82517269 37386347 - 223 110800149 69920879 - 224 88751381 126012078 - 225 16370965 95785000 - 226 162094357 8825308 - 227 257486101 34179275 - 228 34110741 211918326 - 229 28839189 184703579 - 230 241671445 3092218 - 231 135736597 125537493 - 232 247905557 76211434 - 233 41307413 55617595 - 234 52813077 135284678 - 235 13987093 257766540 - 236 193264917 236642188 - 237 53775637 24951240 - 238 132390165 252064830 - 239 160673045 76201967 - 240 138624277 137219547 - 241 66243861 140693250 - 242 211967253 200094819 - 243 38923541 31485696 - 244 83983637 27258839 - 245 78712085 182396905 - 246 23108885 94472246 - 247 185609493 37388733 - 248 29342997 156075392 - 249 91180309 198050941 - 250 102685973 50294709 - 251 63859989 7682088 - 252 243137813 236113621 - 253 103648533 235644094 - 254 182263061 182659809 - 255 210545941 124572223 - 256 188497173 248253400 - 257 116116757 74729644 - 258 261840149 69794234 - 259 88796437 33394692 - 260 133856533 173374600 - 261 128584981 31731783 - 262 72981781 95231041 - 263 235482389 184791413 - 264 79215893 260792549 - 265 141053205 154639247 - 266 152558869 105632372 - 267 113732885 224097940 - 268 24575253 222951663 - 269 153521429 223005316 - 270 232135957 216095828 - 271 260418837 65085279 - 272 238370069 40731813 - 273 165989653 16383270 - 274 43277589 4848098 - 275 138669333 158395352 - 276 183729429 231883785 - 277 178457877 119632757 - 278 122854677 123857692 - 279 16919829 149363710 - 280 129088789 240416538 - 281 190926101 43871601 - 282 202431765 151351299 - 283 163605781 220196816 - 284 74448149 47209944 - 285 203394325 105523994 - 286 13573397 202426520 - 287 41856277 16230224 - 288 19807509 170014787 - 289 215862549 84143216 - 290 93150485 123745497 - 291 188542229 256541308 - 292 233602325 52840026 - 293 228330773 27718003 - 294 172727573 30405831 - 295 66792725 49594710 - 296 178961685 213436447 - 297 240798997 252672547 - 298 252304661 37505122 - 299 213478677 114467804 - 300 124321045 95813009 - 301 253267221 1689216 - 302 63446293 260140971 - 303 91729173 96496144 - 304 69680405 217720496 - 305 265735445 128063114 - 306 143023381 8104608 - 307 238415125 177886192 - 308 15039765 23167868 - 309 9768213 142912066 - 310 222600469 201800002 - 311 116665621 3973502 - 312 228834581 29905908 - 313 22236437 94224806 - 314 33742101 151018386 - 315 263351573 25399992 - 316 174193941 218814490 - 317 34704661 29990071 - 318 113319189 239292814 - 319 141602069 155936672 - 320 119553301 33902573 - 321 47172885 266632053 - 322 192896277 44849975 - 323 19852565 40919093 - 324 64912661 261356397 - 325 59641109 46833120 - 326 4037909 219658382 - 327 166538517 130989174 - 328 10272021 76749466 - 329 72109333 223888376 - 330 83614997 73509265 - 331 44789013 71482469 - 332 224066837 266268019 - 333 84577557 40480189 - 334 163192085 258371137 - 335 191474965 44605440 - 336 169426197 5485562 - 337 97045781 81468207 - 338 242769173 84035230 - 339 69725461 232564553 - 340 114785557 80588334 - 341 109514005 126405710 - 342 53910805 202470057 - 343 216411413 12259902 - 344 60144917 204020751 - 345 121982229 223281434 - 346 133487893 191902304 - 347 94661909 102768865 - 348 5504277 88227229 - 349 134450453 151648659 - 350 213064981 167429572 - 351 241347861 149426992 - 352 219299093 250958551 - 353 146918677 227931577 - 354 24206613 244149462 - 355 119598357 66005293 - 356 164658453 136223679 - 357 159386901 231683468 - 358 103783701 288660 - 359 266284309 34710230 - 360 110017813 261773396 - 361 171855125 210893068 - 362 183360789 87815679 - 363 144534805 237748269 - 364 55377173 71616662 - 365 184323349 213549113 - 366 262937877 84957207 - 367 22785301 52019505 - 368 736533 83504261 - 369 196791573 19204883 - 370 74079509 106810845 - 371 169471253 196601313 - 372 214531349 9880608 - 373 209259797 212720026 - 374 153656597 38735 - 375 47721749 48393791 - 376 159890709 100061033 - 377 221728021 36776910 - 378 233233685 148173934 - 379 194407701 58038857 - 380 105250069 66489951 - 381 234196245 76235183 - 382 44375317 129443131 - 383 72658197 139307521 - 384 50609429 158482690 - 385 246664469 110648125 - 386 123952405 58943924 - 387 219344149 205970789 - 388 264404245 88483665 - 389 259132693 188004472 - 390 203529493 51773914 - 391 97594645 171799671 - 392 209763605 105808206 - 393 3165461 87857505 - 394 14671125 223030702 - 395 244280597 219000629 - 396 155122965 191336184 - 397 15633685 126631414 - 398 94248213 150940974 - 399 122531093 261344673 - 400 100482325 57512015 - 401 28101909 83879480 - 402 173825301 219037787 - 403 781589 212602810 - 404 45841685 222086483 - 405 40570133 7590439 - 406 253402389 5547829 - 407 147467541 254981503 - 408 259636501 129068547 - 409 53038357 214188483 - 410 64544021 162439613 - 411 25718037 33816306 - 412 204995861 27773537 - 413 65506581 214791436 - 414 144121109 267939825 - 415 172403989 268184593 - 416 150355221 167516780 - 417 77974805 57388034 - 418 223698197 168710610 - 419 50654485 66551006 - 420 95714581 260742692 - 421 90443029 58402469 - 422 34839829 248285025 - 423 197340437 147992919 - 424 41073941 19895689 - 425 102911253 265823477 - 426 114416917 84889756 - 427 75590933 157845886 - 428 254868757 231162010 - 429 115379477 190768882 - 430 193994005 62057860 - 431 222276885 9880913 - 432 200228117 70115161 - 433 127847701 149662876 - 434 5135637 26451482 - 435 100527381 154739922 - 436 145587477 54505925 - 437 140315925 190494195 - 438 84712725 93168220 - 439 247213333 237758463 - 440 90946837 165214174 - 441 152784149 92816119 - 442 164289813 108870219 - 443 125463829 172707546 - 444 36306197 114684324 - 445 165252373 173052840 - 446 243866901 188655079 - 447 3714325 141793634 - 448 250101013 152231702 - 449 177720597 210757638 - 450 55008533 179184945 - 451 150400277 58787734 - 452 195460373 258736182 - 453 190188821 253919249 - 454 134585621 195557415 - 455 28650773 105896312 - 456 140819733 146642179 - 457 202657045 82090953 - 458 214162709 84434634 - 459 175336725 196890374 - 460 86179093 65265021 - 461 215125269 11696942 - 462 25304341 229349659 - 463 53587221 245540930 - 464 31538453 263920036 - 465 227593493 90725952 - 466 104881429 208529176 - 467 200273173 165618986 - 468 245333269 186616183 - 469 240061717 98731263 - 470 184458517 137070786 - 471 78523669 139331008 - 472 190692629 82668792 - 473 252529941 83701611 - 474 264035605 130072089 - 475 225209621 80448002 - 476 136051989 201393190 - 477 264998165 93625732 - 478 75177237 34195230 - 479 103460117 171176434 - 480 81411349 255233793 - 481 9030933 176492363 - 482 154754325 232973263 - 483 250146069 56851854 - 484 26770709 225070473 - 485 21499157 111854782 - 486 234331413 36197421 - 487 128396565 188116184 - 488 240565525 91783101 - 489 33967381 216137182 - 490 45473045 95836217 - 491 6647061 210304975 - 492 185924885 104687007 - 493 46435605 457387 - 494 125050133 258551793 - 495 153333013 37189234 - 496 131284245 244662062 - 497 58903829 49675045 - 498 204627221 102570838 - 499 31583509 119410883 - 500 76643605 224152682 - 501 71372053 143343436 - 502 15768853 11426409 - 503 178269461 102305472 - 504 22002965 24038739 - 505 83840277 61015840 - 506 95345941 100216104 - 507 56519957 168079467 - 508 235797781 162071016 - 509 96308501 119116449 - 510 174923029 215602068 - 511 203205909 230503874 - 512 181157141 82258475 - 513 108776725 97198543 - 514 254500117 204246445 - 515 81456405 203349703 - 516 126516501 33916443 - 517 121244949 43250858 - 518 65641749 181246836 - 519 228142357 387960 - 520 71875861 266360248 - 521 133713173 5262130 - 522 145218837 261700839 - 523 106392853 72260567 - 524 17235221 223598850 - 525 146181397 31221095 - 526 224795925 23835143 - 527 253078805 64303074 - 528 231030037 154947576 - 529 158649621 169116489 - 530 35937557 119618261 - 531 131329301 158721947 - 532 176389397 41286300 - 533 171117845 198501592 - 534 115514645 127276879 - 535 9579797 852737 - 536 121748757 131930349 - 537 183586069 167365140 - 538 195091733 161908598 - 539 156265749 41337363 - 540 67108117 139324139 - 541 196054293 123695869 - 542 6233365 70175563 - 543 34516245 193946835 - 544 12467477 44347542 - 545 208522517 115482515 - 546 85810453 235610828 - 547 181202197 104016703 - 548 226262293 96315885 - 549 220990741 190713814 - 550 165387541 236441082 - 551 59452693 222188889 - 552 171621653 7673586 - 553 233458965 128943046 - 554 244964629 187763925 - 555 206138645 193798943 - 556 116981013 27735972 - 557 245927189 246594403 - 558 56106261 204676958 - 559 84389141 201053331 - 560 62340373 137382915 - 561 258395413 54785709 - 562 135683349 133842323 - 563 231075093 157723059 - 564 7699733 49058831 - 565 2428181 138376613 - 566 215260437 90357621 - 567 109325589 246014593 - 568 221494549 12079047 - 569 14896405 8484937 - 570 26402069 189320453 - 571 256011541 111263483 - 572 166853909 7323437 - 573 27364629 249970330 - 574 105979157 8957505 - 575 134262037 204111651 - 576 112213269 15671872 - 577 39832853 105515160 - 578 185556245 201237290 - 579 12512533 169894648 - 580 57572629 18004224 - 581 52301077 159979075 - 582 265133333 75951040 - 583 159198485 190818937 - 584 2931989 263635821 - 585 64769301 192915355 - 586 76274965 16631812 - 587 37448981 180655528 - 588 216726805 196575622 - 589 77237525 252312736 - 590 155852053 138377204 - 591 184134933 53175427 - 592 162086165 66138957 - 593 89705749 117724498 - 594 235429141 19413905 - 595 62385429 259020556 - 596 107445525 121641153 - 597 102173973 105574833 - 598 46570773 43274972 - 599 209071381 175091009 - 600 52804885 75526626 - 601 114642197 263852477 - 602 126147861 56622547 - 603 87321877 252028708 - 604 266599701 177110703 - 605 127110421 103675254 - 606 205724949 174554231 - 607 234007829 135169203 - 608 211959061 138837802 - 609 139578645 209902812 - 610 16866581 243732169 - 611 112258325 6718960 - 612 157318421 210023250 - 613 152046869 93652975 - 614 96443669 110818503 - 615 258944277 48884441 - 616 102677781 103111463 - 617 164515093 71349935 - 618 176020757 159346290 - 619 137194773 175436656 - 620 48037141 67417769 - 621 176983317 190982428 - 622 255597845 235977674 - 623 15445269 31711156 - 624 261831957 83822039 - 625 189451541 232103734 - 626 66739477 187374800 - 627 162131221 68349860 - 628 207191317 133204147 - 629 201919765 242702589 - 630 146316565 128635266 - 631 40381717 199123778 - 632 152550677 196443964 - 633 214387989 2332273 - 634 225893653 174856673 - 635 187067669 69368460 - 636 97910037 254421362 - 637 226856213 95852434 - 638 37035285 172701166 - 639 65318165 129725828 - 640 43269397 19580757 - 641 239324437 34380896 - 642 116612373 237266343 - 643 212004117 25531432 - 644 257064213 9672932 - 645 251792661 134341851 - 646 196189461 215214349 - 647 90254613 207427194 - 648 202423573 205577761 - 649 264260885 175288579 - 650 7331093 221642785 - 651 236940565 52313208 - 652 147782933 51304203 - 653 8293653 205209817 - 654 86908181 103213793 - 655 115191061 10831396 - 656 93142293 64603042 - 657 20761877 3658843 - 658 166485269 243460430 - 659 261877013 265188220 - 660 38501653 226354150 - 661 33230101 155495306 - 662 246062357 220609384 - 663 140127509 192283778 - 664 252296469 249001942 - 665 45698325 171837030 - 666 57203989 149758256 - 667 18378005 242759989 - 668 197655829 113426292 - 669 58166549 100672751 - 670 136781077 146004644 - 671 165063957 61952404 - 672 143015189 68942527 - 673 70634773 258426661 - 674 216358165 56010693 - 675 43314453 100502945 - 676 88374549 96430519 - 677 83102997 156216584 - 678 27499797 263309460 - 679 190000405 3747162 - 680 33733909 176770140 - 681 95571221 110466712 - 682 107076885 77692175 - 683 68250901 222326977 - 684 247528725 22405805 - 685 108039445 169165781 - 686 186653973 151127351 - 687 214936853 133142484 - 688 192888085 151088300 - 689 120507669 111867071 - 690 266231061 61841676 - 691 93187349 186835605 - 692 138247445 6826584 - 693 132975893 254994774 - 694 77372693 193368207 - 695 239873301 28741890 - 696 83606805 107371441 - 697 145444117 109666714 - 698 156949781 123933630 - 699 118123797 109503261 - 700 28966165 165167287 - 701 157912341 260742539 - 702 236526869 237071002 - 703 264809749 74455268 - 704 242760981 161093993 - 705 170380565 219340073 - 706 47668501 111007012 - 707 143060245 105804377 - 708 188120341 76031433 - 709 182848789 33448052 - 710 127245589 129274714 - 711 21310741 117321595 - 712 133479701 159294934 - 713 195317013 19490668 - 714 206822677 138536253 - 715 167996693 22777929 - 716 78839061 123328912 - 717 207785237 225456657 - 718 17964309 253889230 - 719 46247189 4379845 - 720 24198421 217448695 - 721 220253461 162463843 - 722 97541397 53560331 - 723 192933141 244333805 - 724 237993237 154098698 - 725 232721685 146936418 - 726 177118485 189518069 - 727 71183637 119539907 - 728 183352597 182594251 - 729 245189909 226863118 - 730 256695573 239989132 - 731 217869589 80640069 - 732 128711957 15379769 - 733 257658133 181797223 - 734 67837205 51635665 - 735 96120085 41405301 - 736 74071317 170206036 - 737 1690901 59727470 - 738 147414293 7990722 - 739 242806037 184042065 - 740 19430677 91082012 - 741 14159125 177078049 - 742 226991381 224151904 - 743 121056533 153885915 - 744 233225493 27323024 - 745 26627349 44966785 - 746 38133013 9910444 - 747 267742485 133143313 - 748 178584853 228244402 - 749 39095573 248253326 - 750 117710101 17234852 - 751 145992981 35585269 - 752 123944213 137855105 - 753 51563797 29620040 - 754 197287189 92787273 - 755 24243477 43418246 - 756 69303573 5470461 - 757 64032021 242362031 - 758 8428821 83229852 - 759 170929429 70413251 - 760 14662933 80405798 - 761 76500245 129161667 - 762 88005909 103660187 - 763 49179925 30341294 - 764 228457749 75105531 - 765 88968469 6443140 - 766 167582997 740423 - 767 195865877 105408837 - 768 173817109 238884990 - 769 101436693 190630642 - 770 247160085 158003616 - 771 74116373 209386890 - 772 119176469 15753134 - 773 113904917 192841997 - 774 58301717 153676455 - 775 220802325 256046459 - 776 64535829 191896203 - 777 126373141 61065941 - 778 137878805 102856538 - 779 99052821 159158554 - 780 9895189 211323157 - 781 138841365 111726666 - 782 217455893 120641466 - 783 245738773 100929637 - 784 223690005 54913867 - 785 151309589 124377452 - 786 28597525 53693384 - 787 123989269 263566174 - 788 169049365 240419119 - 789 163777813 147007035 - 790 108174613 17109890 - 791 2239765 23968260 - 792 114408725 211847872 - 793 176246037 227604151 - 794 187751701 125988585 - 795 148925717 101213270 - 796 59768085 218515454 - 797 188714261 145722080 - 798 267328789 226991613 - 799 27176213 140636758 - 800 5127445 241301737 - 801 201182485 217785014 - 802 78470421 166781119 - 803 173862165 56009730 - 804 218922261 261086592 - 805 213650709 223346233 - 806 158047509 60454701 - 807 52112661 29538652 - 808 164281621 258749893 - 809 226118933 210394473 - 810 237624597 23109960 - 811 198798613 243429986 - 812 109640981 215171511 - 813 238587157 226918470 - 814 48766229 169844497 - 815 77049109 74583830 - 816 55000341 111231318 - 817 251055381 52471504 - 818 128343317 78884998 - 819 223735061 242077558 - 820 359701 196244642 - 821 263523605 3477767 - 822 207920405 133764520 - 823 101985557 122811268 - 824 214154517 182655898 - 825 7556373 127925996 - 826 19062037 181145208 - 827 248671509 167426878 - 828 159513877 51344960 - 829 20024597 205369469 - 830 98639125 67689204 - 831 126922005 21259942 - 832 104873237 51627155 - 833 32492821 15361467 - 834 178216213 176929565 - 835 5172501 134952379 - 836 50232597 164382355 - 837 44961045 142761638 - 838 257793301 87092979 - 839 151858453 153839740 - 840 264027413 102054975 - 841 57429269 98687806 - 842 68934933 181712503 - 843 30108949 260128491 - 844 209386773 113960345 - 845 69897493 199564163 - 846 148512021 39014823 - 847 176794901 99154182 - 848 154746133 180978336 - 849 82365717 224943989 - 850 228089109 42532996 - 851 55045397 121558735 - 852 100105493 15553364 - 853 94833941 222816020 - 854 39230741 38929167 - 855 201731349 241113156 - 856 45464853 135436213 - 857 107302165 241168992 - 858 118807829 143300934 - 859 79981845 103152999 - 860 259259669 253071298 - 861 119770389 59556185 - 862 198384917 202310442 - 863 226667797 158320182 - 864 204619029 80903037 - 865 132238613 262837247 - 866 9526549 62619836 - 867 104918293 51950259 - 868 149978389 136682213 - 869 144706837 93694546 - 870 89103637 107762170 - 871 251604245 234685148 - 872 95337749 132853242 - 873 157175061 136987730 - 874 168680725 184399589 - 875 129854741 83424947 - 876 40697109 50295996 - 877 169643285 172270079 - 878 248257813 139194237 - 879 8105237 48811575 - 880 254491925 138325802 - 881 182111509 247530329 - 882 59399445 87243715 - 883 154791189 44616039 - 884 199851285 109387078 - 885 194579733 142321760 - 886 138976533 143645621 - 887 33041685 253044805 - 888 145210645 212795151 - 889 207047957 173068564 - 890 218553621 155062100 - 891 179727637 50997967 - 892 90570005 160994437 - 893 219516181 119324021 - 894 29695253 236590753 - 895 57978133 157552903 - 896 35929365 203300264 - 897 231984405 29076867 - 898 109272341 234893722 - 899 204664085 218045163 - 900 249724181 52157047 - 901 244452629 218751294 - 902 188849429 265068608 - 903 82914581 146245757 - 904 195083541 225315572 - 905 256920853 199465126 - 906 268426517 173777555 - 907 229600533 124361147 - 908 140442901 166784798 - 909 953621 19207100 - 910 79568149 76118164 - 911 107851029 66162343 - 912 85802261 125880053 - 913 13421845 262836862 - 914 159145237 87188033 - 915 254536981 153855807 - 916 31161621 83481209 - 917 25890069 173036781 - 918 238722325 53649307 - 919 132787477 32777093 - 920 244956437 20468137 - 921 38358293 66231049 - 922 49863957 90599587 - 923 11037973 153568120 - 924 190315797 186156167 - 925 50826517 258843858 - 926 129441045 44701015 - 927 157723925 161564439 - 928 135675157 24554258 - 929 63294741 261993032 - 930 209018133 31051192 - 931 35974421 238972516 - 932 81034517 53413194 - 933 75762965 123667307 - 934 20159765 164747719 - 935 182660373 31127901 - 936 26393877 253612847 - 937 88231189 160290875 - 938 99736853 24017282 - 939 60910869 257107972 - 940 240188693 69162176 - 941 100699413 151417016 - 942 179313941 260828394 - 943 207596821 25377367 - 944 185548053 17811967 - 945 113167637 145034466 - 946 258891029 184972287 - 947 85847317 55013464 - 948 130907413 80442091 - 949 125635861 189131961 - 950 70032661 179982018 - 951 232533269 259787269 - 952 76266773 237932420 - 953 138104085 63262781 - 954 149609749 92519729 - 955 110783765 16598880 - 956 21626133 202727370 - 957 150572309 83851118 - 958 229186837 37683021 - 959 257469717 44525671 - 960 235420949 224142268 - 961 163040533 30450252 - 962 40328469 130569495 - 963 135720213 257338652 - 964 180780309 14621532 - 965 175508757 219484375 - 966 119905557 217841293 - 967 13970709 31937918 - 968 126139669 91915945 - 969 187976981 162071311 - 970 199482645 146160560 - 971 160656661 87400844 - 972 71499029 168469923 - 973 200445205 174635252 - 974 10624277 30624897 - 975 38907157 69062984 - 976 16858389 225163338 - 977 212913429 36729478 - 978 90201365 254767358 - 979 185593109 159130800 - 980 230653205 242876061 - 981 225381653 64778181 - 982 169778453 128379176 - 983 63843605 2939846 - 984 176012565 202487966 - 985 237849877 38334641 - 986 249355541 34993407 - 987 210529557 51132040 - 988 121371925 84878924 - 989 250318101 5387594 - 990 60497173 89707652 - 991 88780053 217478392 - 992 66731285 139364263 - 993 262786325 13925776 - 994 140074261 139184053 - 995 235466005 147314452 - 996 12090645 78388399 - 997 6819093 111937924 - 998 219651349 30084755 - 999 113716501 22846686 - 1000 225885461 151266659 -=end= -""" - file.close() - -fileTypes.append(qmcchemFile) - -def write_qmcchemFile(f): - assert (isinstance(f,resultsFile)) - if "MCSCF" in f.mo_sets.keys() : - MoType = "MCSCF" - else: - MoType = None - f.clean_uncontractions() - print "Writing qmcin" - qmcchem_write_qmcin(f,method='VMC', JastType='None') - print "Writing qmc.seed" - qmcchem_write_qmc_seed() - print "Writing qmc.basis" - qmcchem_write_qmc_basis(f) - print "Writing qmc.mos" - qmcchem_write_qmc_mos(f,MoType) - print "Writing qmc.jast_det" - qmcchem_write_qmc_jast_det(f) - print "Writing qmc.det" - qmcchem_write_qmc_det(f,MoType) - diff --git a/resultsFile/Modules/qmcchem_newFile.py b/resultsFile/Modules/qmcchem_newFile.py deleted file mode 100755 index 70994d5..0000000 --- a/resultsFile/Modules/qmcchem_newFile.py +++ /dev/null @@ -1,297 +0,0 @@ -#!/usr/bin/python -# resultsFile is a library which allows to read output files of quantum -# chemistry codes and write input files. -# Copyright (C) 2007 Anthony SCEMAMA -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Anthony Scemama -# LCPQ - IRSAMC -# Universite Paul Sabatier -# 118, route de Narbonne -# 31062 Toulouse Cedex 4 -# scemama@irsamc.ups-tlse.fr - - - -import include -eval(include.code) - -import struct -import re - -import os -QMCCHEM_PATH = os.getenv("QMCCHEM_PATH",default="") -if QMCCHEM_PATH == "": - print "QmcChem new files are not handled." - class qmcchem_newFile(resultsFile): - pass -else: - sys.path = [ QMCCHEM_PATH+"/scripts" ]+sys.path - from ezfio import ezfio - - qmcchem_newFile_defined_vars = [ "date", "version", \ - "title", "units", "methods", \ - "point_group", "num_elec", \ - "charge", "multiplicity","geometry",\ - "basis","mo_sets","mo_types",\ - "determinants", "num_alpha", "num_beta",\ - "closed_mos", "active_mos", "virtual_mos", \ - "determinants_mo_type", "det_coefficients", \ - "csf_mo_type", "csf_coefficients", "occ_num", \ - "csf" ] - - class qmcchem_newFile(resultsFile): - """ Class defining the qmcchem_new file. - """ - - local_vars = list(local_vars) - defined_vars = list(qmcchem_newFile_defined_vars) - - def __init__(self,name): - resultsFile.__init__(self,name) - ezfio.set_filename(self.filename) - - def get_version(self): - if self._version is None: - self._version = ezfio.get_version() - return self._version - - def get_date(self): - if self._date is None: - self._date = ezfio.get_ezfio_creation() - return self._date - - def get_num_elec(self): - if self._num_elec is None: - self._num_elec = self.num_alpha + self.num_beta - return self._num_elec - - def get_multiplicity(self): - if self._multiplicity is None: - self._multiplicity = self.num_alpha - self.num_beta + 1 - return self._multiplicity - - def get_charge(self): - if self._charge is None: - self._charge = sum(ezfio.get_nuclei_nucl_charge())-float(self.num_elec) - return self._charge - - def get_title(self): - if self._title is None: - self._title = self.filename - return self._title - - def get_units(self): - if self._units is None: - self._units = 'BOHR' - #for a gamess use the units is give by an option on gamess_write_contrl - return self._units - - def get_methods(self): - if self._methods is None: - self._methods = ['QMC'] - return self._methods - - def get_point_group(self): - if self._point_group is None: - self._point_group = "C1" - return self._point_group - - def get_geometry(self): - if self._geometry is None: - self.get_geometryX() - self.get_basisX() - return self._geometry - - def get_basis(self): - if self._basis is None: - self.get_geometry() - return self._basis - - def get_geometryX(self): - self._geometry = [] - charge = ezfio.get_nuclei_nucl_charge() - coord = ezfio.get_nuclei_nucl_coord() - num = ezfio.get_nuclei_nucl_num() - for i in range(num): - temp = atom() - temp.charge = charge[i] - temp.coord = (coord[0][i], coord[1][i], coord[2][i]) - temp.name = 'X' - temp.basis = [] - self._geometry.append(temp) - - def get_basisX(self): - coef = ezfio.get_ao_basis_ao_coef() - expo = ezfio.get_ao_basis_ao_expo() - nucl = ezfio.get_ao_basis_ao_nucl() - num = ezfio.get_ao_basis_ao_num() - power= ezfio.get_ao_basis_ao_power() - prim_num= ezfio.get_ao_basis_ao_prim_num() - - self._basis = [] - for i in range(num): - contr = contraction() - for j in range(prim_num[i]): - gauss = gaussian() - atom = self._geometry[nucl[i]-1] - gauss.center = atom.coord - gauss.expo = expo[j][i] - name = normalize_basis_name('x'*power[0][i]+'y'*power[1][i]+'z'*power[2][i]) - if name == '': name = 's' - gauss.sym = name - contr.append(coef[j][i],gauss) - self._geometry[nucl[i]-1].basis.append(contr) - self._basis.append(contr) - - - def get_mo_types(self): - if self._mo_types is None: - self._mo_types = ['QMC'] - return self._mo_types - - def get_mo_sets(self): - if self._mo_sets is None: - self._mo_sets = {} - self._mo_sets['QMC'] = [] - coef = ezfio.get_mo_basis_mo_coef() - energy = ezfio.get_mo_basis_mo_energy() - num = ezfio.get_mo_basis_mo_tot_num() - for i in range(num): - v = orbital() - v.basis = self.basis - v.set = 'QMC' - v.eigenvalue = energy[i] - v.vector = coef[i] - self.mo_sets['QMC'].append(v) - return self._mo_sets - - def get_num_alpha(self): - if self._num_alpha is None: - self._num_alpha = ezfio.get_electrons_elec_alpha_num() - return self._num_alpha - - def get_num_beta(self): - if self._num_beta is None: - self._num_beta = ezfio.get_electrons_elec_beta_num() - return self._num_beta - - def get_determinants_mo_type(self): - if self._determinants_mo_type is None: - self._determinants_mo_type = 'QMC' - return self._determinants_mo_type - - def get_csf_mo_type(self): - if self._csf_mo_type is None: - self._csf_mo_type = 'QMC' - return self._csf_mo_type - - def get_determinants(self): - if self._determinants is None: - determinants = [] - if self.csf is not None: - for csf in self.csf: - for new_det in csf.determinants: - determinants.append(new_det) - else: - pass - if determinants != []: - self._determinants_mo_type = self.mo_types[-1] - self._determinants = determinants - return self._determinants - - def get_csf(self): - method = self.methods[0] - if self._csf is None: - csf = [] - ncore = ezfio.get_mo_basis_mo_closed_num() - nact = ezfio.get_mo_basis_mo_active_num() - core_a = [] - core_b = [] - for i in range(ncore): - core_a.append(i) - core_b.append(i) - num = ezfio.get_determinants_det_num() - occ = ezfio.get_determinants_det_occ() - if occ == []: - occ = [[[0]],[[0]]] - for i in range(num): - this_csf = CSF() - tempcsf_a = core_a + map(lambda x: x-1, occ[0][i]) - tempcsf_b = core_b + map(lambda x: x-1, occ[1][i]) - this_csf.append(1.,tempcsf_a,tempcsf_b) - csf.append(this_csf) - if csf != []: - self._csf = csf - return self._csf - - - def get_closed_mos(self): - if self._closed_mos is None: - cls = ezfio.get_mo_basis_mo_classif() - self._closed_mos = [] - self._virtual_mos = [] - self._active_mos = [] - for i in range(len(cls)): - if cls[i] == 'c': - self._closed_mos.append(i) - elif cls[i] == 'a': - self._active_mos.append(i) - elif cls[i] == 'v': - self._virtual_mos.append(i) - return self._closed_mos - - def get_virtual_mos(self): - if self._virtual_mos is None: - self.get_closed_mos() - return self._virtual_mos - - def get_active_mos(self): - if self._active_mos is None: - self.get_closed_mos() - return self._active_mos - - def get_det_coefficients(self): - if self._det_coefficients is None: - self._det_coefficients = [] - csf = self.csf - for state_coef in self.csf_coefficients: - vector = [] - for i,c in enumerate(state_coef): - for d in csf[i].coefficients: - vector.append(c*d) - self._det_coefficients.append(vector) - return self._det_coefficients - - def get_csf_coefficients(self): - if self._csf_coefficients is None: - self._csf_coefficients = [ [] ] - self._csf_coefficients[0] = ezfio.get_determinants_det_coef() - return self._csf_coefficients - - def get_occ_num(self): - if self._occ_num is None: - self._occ_num = {} - motype = 'QMC' - self._occ_num[motype] = ezfio.get_mo_basis_mo_occ() - return self._occ_num - - -fileTypes.append(qmcchem_newFile) - -if __name__ == '__main__': - main(qmcchem_newFile) -