tilde-lab / aiida-crystal-dft

AiiDA plugin for the ab initio modeling suite CRYSTAL, developed in Turin University
MIT License
3 stars 4 forks source link

BasisFile parsing troubles #39

Closed blokhin closed 4 years ago

blokhin commented 4 years ago

There are parsing troubles with some basis sets taken from CRYSTAL website:

print(BasisFile().parse(
"""
22 9
0  0  8  2.  1.
 225338        0.000228
 32315         0.001929
 6883.61       0.011100
 1802.14       0.05
 543.063       0.17010
 187.549       0.369
 73.2133       0.4033
 30.3718       0.1445
0 1 6 8. 1.
 554.042      -0.0059       0.0085
 132.525      -0.0683       0.0603
 43.6801      -0.1245       0.2124
17.2243       0.2532       0.3902
 7.2248        0.6261       0.4097
 2.4117        0.282        0.2181
0 1 4 8. 1.
 24.4975       0.0175      -0.0207
 11.4772      -0.2277      -0.0653
 4.4653       -0.7946       0.1919
 1.8904        1.0107       1.3778
0 1 1 2. 1.
 0.790008359901 1. 1.
0 1 1 0. 1.
 0.35160337936 1. 1.
0 3 3 2. 1.
 8.89621398666 0.163566701992
 2.76266406164 0.444392907716
 1.0600606657 0.505403203892
0 3 1 0. 1.
 0.858484740501  1.
0 3 1 0. 1
 0.486945513149 1.
0 4 1 0. 1
 0.633249434959 1.
"""))
print(BasisFile().parse("""
44 9
0 0 9 2. 1.
 3166277   0.00004
 482609.1875   0.00037
 105231.7031   0.00219
 26313.60547   0.0112
 7459.587891   0.0469
 2360.604004   0.1563
 833.39624   0.3526
 326.658875   0.4256
 134.861252   0.1722
0 1 7 8. 1.
 9112.118164   -0.000365   0.00102
 2105.316895   -0.00667   0.00942
 637.714905   -0.0568   0.0565
 222.595306   -0.1476   0.2188
 87.473663   0.1814   0.4567
 38.763508   0.6558   0.4141
 18.197332   0.338   0.1416
0 1 6 8. 1.
 198.43043   0.0057   -0.0145
 74.031459   -0.0379   -0.0729
 31.257783   -0.336   0.0624
 13.428948   0.0911   0.9371
 6.114899   0.9727   1.2605
 2.837471   0.3545   0.3796
0 3 6 10. 1.
 302.699   0.00952
 90.0461   0.0687
 33.4152   0.2419
 13.6072   0.4398
 5.7385   0.3871
 2.3658   0.1007
0 1 3 8. 1.
 4.8237   -3.7531   -0.0844
 2.2638   1.209   0.53
 0.9834   9.1158   0.9781
0 1 1 1. 1.
 0.4137   1.0   1.0
0 1 1 0. 1.
 0.2   1.0
0 3 3 7. 1.
 3.5258   0.1719
 1.3399   0.4625
 0.5788   0.4814
0 3 1 0. 1.
 0.25    1.0
"""))
print(BasisFile().parse("""
1 3
0 0 3 1.0 1.0
 .1873113696D+02 .3349460434D-01
 .2825394365D+01 .2347269535D+00
 .6401216923D+00 .8137573262D+00
0 0 1 0.0 1.0
 .1612777588D+00 .1000000000D+01
0 2 1 0.0 1.0
 .1100000000D+01 .1000000000D+01
"""))

Considerable parts of data are getting lost!

ansobolev commented 4 years ago

The last one has a very unconventional D exponential notation, I'm seeing something like this for the first time ever. The two others were not parsed because of integer numbers in exponents; changed the parser to account for them.

blokhin commented 4 years ago

@ansobolev do you recommend just to replace D with E ?

ansobolev commented 4 years ago

Yes, that should suffice.