'''
    QC-DMET: a python implementation of density matrix embedding theory for ab initio quantum chemistry
    Copyright (C) 2015 Sebastian Wouters
    
    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.
'''

import qcdmet_paths
from pyscf import gto

def structure( number, thebasis1, thebasis2 ):

    irc = None
    mol = gto.Mole()
    
    if ( number == 0 ):
        irc = 0.0
        mol.atom = '''
F     0.25966663   -6.08431533   -1.88225365
F     0.25966663   -6.08431533    1.88225365
C     0.14033804   -5.96276887    0.00000000
H     1.20993894   -5.95377884    0.00000000
H    -0.36528217   -6.90619348    0.00000000
C    -0.65262771   -4.68972365    0.00000000
H    -1.28834617   -4.69173340   -0.88733299
H    -1.28834617   -4.69173340    0.88733299
C     0.22797633   -3.44253057    0.00000000
H     0.87529479   -3.47614715   -0.88104480
H     0.87529479   -3.47614715    0.88104480
C    -0.56743963   -2.13720471    0.00000000
H    -1.22647265   -2.11484022    0.87573255
H    -1.22647265   -2.11484022   -0.87573255
C     0.30700055   -0.88222977    0.00000000
H     0.96633341   -0.90423747   -0.87460185
H     0.96633341   -0.90423747    0.87460185
C    -0.48466231    0.42653743    0.00000000
H    -1.14420803    0.44881709    0.87466078
H    -1.14420803    0.44881709   -0.87466078
C     0.39177439    1.68004596    0.00000000
H     1.05125190    1.65831059   -0.87443480
H     1.05125190    1.65831059    0.87443480
C    -0.40017601    2.98847125    0.00000000
H    -1.05953532    3.01073848    0.87452252
H    -1.05953532    3.01073848   -0.87452252
C     0.47741823    4.24103665    0.00000000
H     1.13672049    4.21908486   -0.87448568
H     1.13672049    4.21908486    0.87448568
C    -0.31436523    5.54921039    0.00000000
H    -0.97378375    5.57270248    0.87453171
H    -0.97378375    5.57270248   -0.87453171
C     0.56315593    6.80170616    0.00000000
H     1.22147119    6.77933477   -0.87396869
H     1.22147119    6.77933477    0.87396869
C    -0.23734630    8.10344213    0.00000000
H    -0.88008027    8.17061738    0.88061616
H     0.41677527    8.97723315    0.00000000
H    -0.88008027    8.17061738   -0.88061616
'''

    if ( number == 1 ):
        irc = 0.30503
        mol.atom = '''
F        0.226079    5.867495    1.894608
F        0.245187    5.864721   -1.869638
C        0.116823    5.744172   -0.040409
H        1.185091    5.737766    0.016300
H       -0.391316    6.685479    0.001748
C       -0.673032    4.469210   -0.009041
H       -1.300661    4.482934    0.882964
H       -1.316532    4.456570   -0.891738
C        0.210656    3.224204   -0.000286
H        0.851603    3.263059    0.884939
H        0.864289    3.255821   -0.876998
C       -0.581417    1.916851   -0.003467
H       -1.235807    1.892181   -0.882661
H       -1.245071    1.893454    0.868622
C        0.296191    0.664103    0.001668
H        0.950633    0.688008    0.879813
H        0.960401    0.687571   -0.869234
C       -0.492130   -0.646671   -0.002534
H       -1.146768   -0.670861   -0.880809
H       -1.156578   -0.670390    0.868306
C        0.387474   -1.897946    0.002748
H        1.042011   -1.874261    0.880791
H        1.051898   -1.874803   -0.867886
C       -0.401136   -3.208380   -0.001310
H       -1.055591   -3.232600   -0.879429
H       -1.065411   -3.232047    0.869400
C        0.479624   -4.458710    0.004032
H        1.133992   -4.434811    0.882120
H        1.143880   -4.435350   -0.866627
C       -0.308820   -5.768892   -0.000024
H       -0.963321   -5.794328   -0.878160
H       -0.973173   -5.793793    0.870688
C        0.571866   -7.019153    0.005321
H        1.225254   -6.994845    0.882875
H        1.235134   -6.995371   -0.864811
C       -0.225313   -8.322920    0.001210
H       -0.862979   -8.391995   -0.882913
H        0.431017   -9.195044    0.005181
H       -0.872915   -8.391463    0.878118
'''

    if ( number == 2 ):
        irc = 0.61013
        mol.atom = '''
F        0.226997    5.868394    1.907307
F        0.244200    5.863869   -1.856454
C        0.116996    5.744136   -0.079681
H        1.181923    5.737341    0.027101
H       -0.390975    6.683046    0.007101
C       -0.672931    4.469359   -0.013053
H       -1.287177    4.496419    0.886998
H       -1.329088    4.444067   -0.887212
C        0.210629    3.224217   -0.000809
H        0.850230    3.266390    0.885027
H        0.865741    3.252384   -0.876843
C       -0.581407    1.916841   -0.003090
H       -1.236097    1.891807   -0.882134
H       -1.244779    1.893840    0.869144
C        0.296189    0.664095    0.001874
H        0.950670    0.687955    0.879940
H        0.960369    0.687603   -0.869108
C       -0.492128   -0.646675   -0.002486
H       -1.146787   -0.670836   -0.880774
H       -1.156560   -0.670421    0.868342
C        0.387473   -1.897949    0.002747
H        1.041995   -1.874252    0.880786
H        1.051914   -1.874817   -0.867890
C       -0.401135   -3.208382   -0.001313
H       -1.055613   -3.232616   -0.879424
H       -1.065388   -3.232033    0.869405
C        0.479624   -4.458711    0.004030
H        1.133982   -4.434802    0.882117
H        1.143890   -4.435360   -0.866630
C       -0.308819   -5.768893   -0.000024
H       -0.963332   -5.794335   -0.878155
H       -0.973160   -5.793788    0.870692
C        0.571867   -7.019153    0.005320
H        1.225251   -6.994843    0.882873
H        1.235139   -6.995374   -0.864813
C       -0.225311   -8.322920    0.001210
H       -0.862983   -8.391999   -0.882912
H        0.431019   -9.195045    0.005183
H       -0.872908   -8.391461    0.878120
'''

    if ( number == 3 ):
        irc = 0.91518
        mol.atom = '''
F        0.227965    5.869332    1.919960
F        0.243238    5.863016   -1.843098
C        0.117085    5.744028   -0.118842
H        1.176651    5.736584    0.037232
H       -0.390538    6.678930    0.011643
C       -0.672752    4.469633   -0.017234
H       -1.273018    4.510452    0.890842
H       -1.341572    4.431867   -0.882414
C        0.210577    3.224246   -0.001384
H        0.848859    3.269734    0.885062
H        0.867255    3.248842   -0.876696
C       -0.581386    1.916825   -0.002694
H       -1.236397    1.891420   -0.881571
H       -1.244467    1.894245    0.869695
C        0.296188    0.664079    0.002093
H        0.950716    0.687884    0.880079
H        0.960336    0.687634   -0.868971
C       -0.492125   -0.646683   -0.002436
H       -1.146800   -0.670808   -0.880738
H       -1.156546   -0.670460    0.868377
C        0.387471   -1.897955    0.002748
H        1.041978   -1.874247    0.880783
H        1.051931   -1.874832   -0.867893
C       -0.401134   -3.208385   -0.001317
H       -1.055633   -3.232634   -0.879421
H       -1.065368   -3.232021    0.869407
C        0.479623   -4.458713    0.004028
H        1.133971   -4.434794    0.882116
H        1.143902   -4.435372   -0.866630
C       -0.308818   -5.768894   -0.000024
H       -0.963341   -5.794342   -0.878152
H       -0.973150   -5.793783    0.870695
C        0.571867   -7.019154    0.005319
H        1.225245   -6.994842    0.882873
H        1.235146   -6.995376   -0.864813
C       -0.225311   -8.322921    0.001210
H       -0.862987   -8.392002   -0.882911
H        0.431019   -9.195047    0.005186
H       -0.872903   -8.391459    0.878120
'''

    if ( number == 4 ):
        irc = 1.22018
        mol.atom = '''
F        0.228999    5.870328    1.932781
F        0.242320    5.862162   -1.829701
C        0.117046    5.743826   -0.157791
H        1.169434    5.735534    0.046102
H       -0.390108    6.673300    0.014762
C       -0.672508    4.470020   -0.021711
H       -1.257991    4.525124    0.894483
H       -1.354200    4.419846   -0.877300
C        0.210501    3.224287   -0.002052
H        0.847457    3.273148    0.885021
H        0.868859    3.245134   -0.876575
C       -0.581355    1.916801   -0.002268
H       -1.236721    1.891006   -0.880951
H       -1.244124    1.894680    0.870297
C        0.296188    0.664056    0.002333
H        0.950773    0.687788    0.880235
H        0.960298    0.687666   -0.868817
C       -0.492121   -0.646696   -0.002380
H       -1.146810   -0.670774   -0.880698
H       -1.156536   -0.670510    0.868415
C        0.387469   -1.897963    0.002749
H        1.041962   -1.874246    0.880781
H        1.051947   -1.874847   -0.867895
C       -0.401132   -3.208390   -0.001321
H       -1.055654   -3.232652   -0.879419
H       -1.065347   -3.232011    0.869410
C        0.479623   -4.458716    0.004025
H        1.133960   -4.434787    0.882116
H        1.143914   -4.435384   -0.866631
C       -0.308817   -5.768896   -0.000024
H       -0.963351   -5.794349   -0.878149
H       -0.973140   -5.793779    0.870698
C        0.571867   -7.019155    0.005318
H        1.225239   -6.994842    0.882874
H        1.235153   -6.995379   -0.864812
C       -0.225310   -8.322923    0.001209
H       -0.862992   -8.392006   -0.882910
H        0.431018   -9.195051    0.005189
H       -0.872899   -8.391456    0.878121
'''

    if ( number == 5 ):
        irc = 1.52477
        mol.atom = '''
F        0.230144    5.871422    1.946217
F        0.241497    5.861312   -1.816624
C        0.116716    5.743414   -0.196342
H        1.160681    5.734178    0.053532
H       -0.390183    6.666527    0.015868
C       -0.672200    4.470524   -0.026725
H       -1.241641    4.540642    0.897839
H       -1.367204    4.408086   -0.871715
C        0.210396    3.224344   -0.002899
H        0.845991    3.276677    0.884835
H        0.870593    3.241180   -0.876518
C       -0.581312    1.916766   -0.001789
H       -1.237089    1.890537   -0.880234
H       -1.243727    1.895165    0.870987
C        0.296190    0.664021    0.002610
H        0.950848    0.687656    0.880421
H        0.960251    0.687707   -0.868633
C       -0.492116   -0.646714   -0.002311
H       -1.146809   -0.670728   -0.880652
H       -1.156534   -0.670581    0.868459
C        0.387466   -1.897976    0.002751
H        1.041947   -1.874255    0.880779
H        1.051961   -1.874862   -0.867897
C       -0.401130   -3.208398   -0.001326
H       -1.055673   -3.232673   -0.879417
H       -1.065328   -3.232003    0.869411
C        0.479622   -4.458720    0.004023
H        1.133947   -4.434781    0.882117
H        1.143926   -4.435398   -0.866630
C       -0.308816   -5.768899   -0.000024
H       -0.963360   -5.794357   -0.878147
H       -0.973130   -5.793776    0.870700
C        0.571867   -7.019157    0.005318
H        1.225233   -6.994842    0.882876
H        1.235160   -6.995383   -0.864811
C       -0.225309   -8.322925    0.001209
H       -0.862996   -8.392009   -0.882909
H        0.431017   -9.195055    0.005191
H       -0.872896   -8.391454    0.878121
'''

    if ( number == 6 ):
        irc = 1.82916
        mol.atom = '''
F        0.231421    5.872636    1.960698
F        0.240809    5.860481   -1.804271
C        0.116066    5.742825   -0.234382
H        1.150418    5.732719    0.058751
H       -0.390632    6.658737    0.014491
C       -0.671882    4.471066   -0.032302
H       -1.223894    4.557001    0.901001
H       -1.380967    4.396183   -0.865569
C        0.210268    3.224407   -0.003978
H        0.844410    3.280471    0.884471
H        0.872475    3.236879   -0.876574
C       -0.581261    1.916721   -0.001244
H       -1.237535    1.889975   -0.879380
H       -1.243244    1.895730    0.871807
C        0.296195    0.663977    0.002937
H        0.950945    0.687484    0.880649
H        0.960192    0.687762   -0.868408
C       -0.492109   -0.646739   -0.002227
H       -1.146799   -0.670666   -0.880596
H       -1.156541   -0.670677    0.868513
C        0.387462   -1.897993    0.002754
H        1.041936   -1.874273    0.880777
H        1.051972   -1.874875   -0.867899
C       -0.401128   -3.208408   -0.001332
H       -1.055694   -3.232696   -0.879415
H       -1.065307   -3.231998    0.869412
C        0.479621   -4.458726    0.004020
H        1.133935   -4.434776    0.882117
H        1.143939   -4.435414   -0.866629
C       -0.308814   -5.768903   -0.000025
H       -0.963369   -5.794367   -0.878143
H       -0.973120   -5.793773    0.870703
C        0.571867   -7.019160    0.005318
H        1.225227   -6.994842    0.882877
H        1.235168   -6.995387   -0.864809
C       -0.225308   -8.322928    0.001208
H       -0.863000   -8.392013   -0.882909
H        0.431015   -9.195061    0.005194
H       -0.872892   -8.391452    0.878121
'''

    if ( number == 7 ):
        irc = 2.13145
        mol.atom = '''
F        0.232954    5.874084    1.977377
F        0.240431    5.859703   -1.793974
C        0.114682    5.741837   -0.271221
H        1.139163    5.731254    0.062210
H       -0.392476    6.650485    0.010367
C       -0.671605    4.471590   -0.038745
H       -1.204217    4.574035    0.903703
H       -1.395655    4.384713   -0.858619
C        0.210109    3.224466   -0.005559
H        0.842675    3.284649    0.883671
H        0.874517    3.232088   -0.876959
C       -0.581203    1.916656   -0.000562
H       -1.238167    1.889205   -0.878235
H       -1.242565    1.896459    0.872912
C        0.296208    0.663916    0.003372
H        0.951082    0.687237    0.880965
H        0.960107    0.687846   -0.868096
C       -0.492102   -0.646774   -0.002105
H       -1.146766   -0.670568   -0.880518
H       -1.156568   -0.670826    0.868588
C        0.387458   -1.898018    0.002760
H        1.041932   -1.874313    0.880774
H        1.051975   -1.874883   -0.867902
C       -0.401127   -3.208424   -0.001340
H       -1.055715   -3.232723   -0.879415
H       -1.065287   -3.231999    0.869412
C        0.479620   -4.458736    0.004016
H        1.133921   -4.434774    0.882118
H        1.143953   -4.435433   -0.866629
C       -0.308813   -5.768910   -0.000025
H       -0.963379   -5.794379   -0.878140
H       -0.973109   -5.793773    0.870707
C        0.571867   -7.019165    0.005317
H        1.225220   -6.994845    0.882880
H        1.235176   -6.995393   -0.864806
C       -0.225307   -8.322932    0.001208
H       -0.863003   -8.392018   -0.882908
H        0.431013   -9.195068    0.005198
H       -0.872889   -8.391451    0.878121
'''

    if ( number == 8 ):
        irc = 2.41885
        mol.atom = '''
F        0.234838    5.875823    1.997140
F        0.240652    5.859058   -1.788155
C        0.112193    5.740441   -0.303767
H        1.127155    5.730345    0.062001
H       -0.396445    6.642385    0.001668
C       -0.671478    4.471929   -0.046135
H       -1.183226    4.590916    0.905920
H       -1.411335    4.374083   -0.851191
C        0.209924    3.224477   -0.007971
H        0.840870    3.289260    0.882039
H        0.876563    3.226799   -0.878078
C       -0.581147    1.916558    0.000271
H       -1.239147    1.888054   -0.876656
H       -1.241529    1.897486    0.874445
C        0.296234    0.663832    0.003968
H        0.951258    0.686909    0.881430
H        0.960002    0.687962   -0.867636
C       -0.492094   -0.646824   -0.001918
H       -1.146693   -0.670411   -0.880402
H       -1.156630   -0.671059    0.868703
C        0.387456   -1.898056    0.002775
H        1.041944   -1.874393    0.880770
H        1.051963   -1.874877   -0.867906
C       -0.401127   -3.208449   -0.001352
H       -1.055736   -3.232755   -0.879417
H       -1.065268   -3.232013    0.869409
C        0.479620   -4.458752    0.004009
H        1.133907   -4.434776    0.882117
H        1.143968   -4.435458   -0.866629
C       -0.308811   -5.768920   -0.000026
H       -0.963388   -5.794395   -0.878136
H       -0.973098   -5.793776    0.870710
C        0.571868   -7.019172    0.005317
H        1.225214   -6.994850    0.882883
H        1.235184   -6.995401   -0.864803
C       -0.225306   -8.322939    0.001207
H       -0.863007   -8.392025   -0.882907
H        0.431011   -9.195078    0.005201
H       -0.872887   -8.391452    0.878121
'''

    mol.basis = { 'H': thebasis1, 'C': thebasis1, 'F': thebasis2 }
    mol.charge = -1
    mol.spin = 0
    mol.build()
    return mol

