Commit 79a47b4f authored by Hagen-Henrik Kowalski's avatar Hagen-Henrik Kowalski
Browse files

added scala backend

parent bbb81fe1
package eu.nomad_lab.parsers
import eu.nomad_lab
import eu.nomad_lab.DefaultPythonInterpreter
import org.{ json4s => jn }
import eu.{ nomad_lab => lab }
import scala.collection.breakOut
object QhpParser extends SimpleExternalParserGenerator(
name = "QhpParser",
parserInfo = jn.JObject(
("name" -> jn.JString("QhpParser")) ::
("parserId" -> jn.JString("QhpParser" + lab.QhpVersionInfo.version)) ::
("versionInfo" -> jn.JObject(
("nomadCoreVersion" -> jn.JObject(lab.NomadCoreVersionInfo.toMap.map {
case (k, v) => k -> jn.JString(v.toString)
}(breakOut): List[(String, jn.JString)])) ::
(lab.QhpVersionInfo.toMap.map {
case (key, value) =>
(key -> jn.JString(value.toString))
}(breakOut): List[(String, jn.JString)])
)) :: Nil
),
mainFileTypes = Seq("text/.*"),
mainFileRe = """\.\s*QHP \.\.\.""".r,
cmd = Seq(DefaultPythonInterpreter.pythonExe(), "${envDir}/parsers/quasi-harmonic-properties/parser/parser-quasi-harmonic-properties/qhp.py", "${mainFileUri}", "${mainFilePath}"),
resList = Seq(
"parser-quasi-harmonic-properties/qhp.py",
"parser-quasi-harmonic-properties/setup_paths.py",
"nomad_meta_info/public.nomadmetainfo.json",
"nomad_meta_info/common.nomadmetainfo.json",
"nomad_meta_info/meta_types.nomadmetainfo.json",
"nomad_meta_info/quasi-harmonic-properties.nomadmetainfo.json"
) ++ DefaultPythonInterpreter.commonFiles(),
dirMap = Map(
"parser-quasi-harmonic-properties" -> "parsers/quasi-harmonic-properties/parser/parser-quasi-harmonic-properties",
"nomad_meta_info" -> "nomad-meta-info/meta_info/nomad_meta_info"
) ++ lab.DefaultPythonInterpreter.commonDirMapping(),
metaInfoEnv = Some(lab.meta.KnownMetaInfoEnvs.qhp)
)
package eu.nomad_lab.parsers
import org.specs2.mutable.Specification
object QhpParserSpec extends Specification {
"QhpParserTest" >> {
"Si test with json-events" >> {
ParserRun.parse(QhpParser, "parsers/quasi-harmonic-properties/test/examples/exp/Quasi-harmonic_properties.txt", "json-events") must_== ParseResult.ParseSuccess
}
"Si test with json" >> {
ParserRun.parse(QhpParser, "parsers/quasi-harmonic-properties/test/examples/exp/Quasi-harmonic_properties.txt", "json") must_== ParseResult.ParseSuccess
}
}
}
# QHA 1.0
#Quasi-harmonic properties for Pt spacegroup 225
#Temperature (K) Volume (a^3) thermal expansion (1/K) Bulkmodulus (eV/a^3) Free Energy(eV/atom) cV (k_B/cell)
0 15.6885201973 0.0000000000 1.5290419929 0.0208150000 0.0000000000
5 15.6885213424 0.0000000493 1.5290282200 0.0208150000 0.0056607809
10 15.6885433913 0.0000001969 1.5289966469 0.0208110000 0.0362157985
15 15.6886140344 0.0000005073 1.5288540712 0.0208010000 0.1118477216
20 15.6887821673 0.0000010029 1.5285788242 0.0207740000 0.2461425184
25 15.6890860710 0.0000016430 1.5281042503 0.0207200000 0.4275387318
30 15.6895555020 0.0000023549 1.5274526663 0.0206290000 0.6341249220
35 15.6901944693 0.0000031100 1.5266091005 0.0204930000 0.8472932430
40 15.6910194139 0.0000038421 1.5256059130 0.0203050000 1.0545612880
45 15.6920030854 0.0000045096 1.5244782788 0.0200600000 1.2486390840
50 15.6931423728 0.0000051230 1.5232303657 0.0197550000 1.4259759834
55 15.6944149629 0.0000056903 1.5219120916 0.0193890000 1.5854612252
60 15.6958215452 0.0000061860 1.5205063515 0.0189610000 1.7274628928
65 15.6973278075 0.0000066182 1.5190477901 0.0184700000 1.8531374685
70 15.6989381726 0.0000070190 1.5175422254 0.0179170000 1.9640161396
75 15.7006335558 0.0000073722 1.5160025585 0.0173040000 2.0617252269
80 15.7024106265 0.0000076759 1.5144234104 0.0166310000 2.1478495969
85 15.7042494601 0.0000079487 1.5128133877 0.0159010000 2.2238503792
90 15.7061554936 0.0000081924 1.5112028631 0.0151130000 2.2910435182
95 15.7081096031 0.0000084057 1.5095565623 0.0142700000 2.3505828049
100 15.7101166149 0.0000086143 1.5079091398 0.0133730000 2.4034768361
105 15.7121695528 0.0000087679 1.5062199602 0.0124250000 2.4505950918
110 15.7142495031 0.0000089211 1.5045406759 0.0114250000 2.4926841098
115 15.7163751994 0.0000091066 1.5028374521 0.0103760000 2.5303906749
120 15.7185431751 0.0000092227 1.5011397100 0.0092800000 2.5642667007
125 15.7207242019 0.0000093209 1.4994211700 0.0081370000 2.5947829423
130 15.7229391087 0.0000094357 1.4977062800 0.0069480000 2.6223503665
135 15.7251749283 0.0000095488 1.4959779671 0.0057160000 2.6473189014
140 15.7274438270 0.0000096377 1.4942469665 0.0044410000 2.6699932675
145 15.7297222189 0.0000097137 1.4925166638 0.0031250000 2.6906333720
150 15.7320276453 0.0000097999 1.4907599510 0.0017680000 2.7094686042
155 15.7343473867 0.0000098839 1.4890093627 0.0003710000 2.7266955399
160 15.7366931327 0.0000099685 1.4872636452 -0.0010640000 2.7424876321
165 15.7390535299 0.0000100086 1.4855131860 -0.0025360000 2.7569945348
170 15.7414189040 0.0000100721 1.4837492456 -0.0040450000 2.7703475572
175 15.7438100176 0.0000101265 1.4819822678 -0.0055890000 2.7826642777
180 15.7462018089 0.0000101795 1.4802104068 -0.0071690000 2.7940449963
185 15.7486186573 0.0000102447 1.4784371628 -0.0087820000 2.8045816099
190 15.7510420271 0.0000102936 1.4766645264 -0.0104290000 2.8143526715
195 15.7534827259 0.0000103536 1.4748945226 -0.0121080000 2.8234296952
200 15.7559351997 0.0000104006 1.4731079688 -0.0138180000 2.8318753042
205 15.7583988633 0.0000104309 1.4713185919 -0.0155600000 2.8397456085
210 15.7608664162 0.0000104665 1.4695285688 -0.0173320000 2.8470903832
215 15.7633477138 0.0000105182 1.4677453849 -0.0191340000 2.8539550669
220 15.7658404548 0.0000105434 1.4659570852 -0.0209660000 2.8603798133
225 15.7683344606 0.0000105670 1.4641515144 -0.0228260000 2.8664003666
230 15.7708391643 0.0000106281 1.4623572361 -0.0247130000 2.8720498114
235 15.7733629036 0.0000106669 1.4605575606 -0.0266290000 2.8773579341
240 15.7758867692 0.0000106862 1.4587449408 -0.0285710000 2.8823505408
245 15.7784204537 0.0000107322 1.4569445856 -0.0305400000 2.8870521668
250 15.7809669034 0.0000107537 1.4551391383 -0.0325350000 2.8914848001
255 15.7835115615 0.0000107823 1.4533218893 -0.0345550000 2.8956677837
260 15.7860723658 0.0000108326 1.4515067874 -0.0366000000 2.8996198958
265 15.7886417025 0.0000108607 1.4496967388 -0.0386700000 2.9033573598
270 15.7912166593 0.0000108789 1.4478711006 -0.0407640000 2.9068951604
275 15.7937954440 0.0000109023 1.4460569190 -0.0428820000 2.9102470430
280 15.7963823145 0.0000109385 1.4442267742 -0.0450240000 2.9134257861
285 15.7989791270 0.0000109714 1.4424086961 -0.0471880000 2.9164430326
290 15.8015824160 0.0000110056 1.4405742519 -0.0493750000 2.9193093226
295 15.8041962994 0.0000110408 1.4387491426 -0.0515850000 2.9220345662
300 15.8068171366 0.0000110349 1.4369156645 -0.0538160000 2.9246276732
305 15.8094290946 0.0000110622 1.4350764016 -0.0560690000 2.9270965455
310 15.8120637705 0.0000111206 1.4332520642 -0.0583440000 2.9294496947
315 15.8147042885 0.0000111375 1.4314061509 -0.0606390000 2.9316937651
320 15.8173478529 0.0000111653 1.4295634697 -0.0629550000 2.9338352594
325 15.8200024561 0.0000111833 1.4277242463 -0.0652910000 2.9358804526
330 15.8226554264 0.0000111969 1.4258659932 -0.0676470000 2.9378346941
335 15.8253173984 0.0000112339 1.4240241970 -0.0700240000 2.9397034696
340 15.8279888511 0.0000112619 1.4221860448 -0.0724200000 2.9414916536
345 15.8306649850 0.0000112817 1.4203243890 -0.0748350000 2.9432036723
350 15.8333467745 0.0000113160 1.4184651982 -0.0772690000 2.9448437669
355 15.8360400766 0.0000113473 1.4166191775 -0.0797220000 2.9464159844
360 15.8387376600 0.0000113451 1.4147616148 -0.0821930000 2.9479238493
365 15.8414308523 0.0000113564 1.4128964141 -0.0846830000 2.9493706310
370 15.8441346867 0.0000113943 1.4110289307 -0.0871910000 2.9507598185
375 15.8468468540 0.0000114210 1.4091654202 -0.0897160000 2.9520943619
380 15.8495643046 0.0000114517 1.4073012027 -0.0922600000 2.9533770106
385 15.8522920044 0.0000114779 1.4054398784 -0.0948210000 2.9546104793
390 15.8550228219 0.0000114881 1.4035635559 -0.0973980000 2.9557971103
395 15.8577563210 0.0000115083 1.4016830089 -0.0999930000 2.9569392166
400 15.8604976893 0.0000115538 1.3998098115 -0.1026040000 2.9580390562
405 15.8632537691 0.0000115822 1.3979275785 -0.1052330000 2.9590987731
410 15.8660096362 0.0000115918 1.3960516380 -0.1078770000 2.9601200605
415 15.8687712430 0.0000116100 1.3941696985 -0.1105380000 2.9611048192
420 15.8715367222 0.0000116383 1.3922830250 -0.1132150000 2.9620547298
425 15.8743127619 0.0000116590 1.3904070551 -0.1159080000 2.9629714914
430 15.8770890831 0.0000116880 1.3885065797 -0.1186160000 2.9638564770
435 15.8798798915 0.0000117070 1.3866332928 -0.1213400000 2.9647113119
440 15.8826662741 0.0000117214 1.3847306398 -0.1240800000 2.9655370937
445 15.8854649231 0.0000117580 1.3828304070 -0.1268340000 2.9663353205
450 15.8882697088 0.0000117810 1.3809422314 -0.1296040000 2.9671071182
455 15.8910803079 0.0000117927 1.3790481281 -0.1323880000 2.9678536266
460 15.8938916594 0.0000118291 1.3771433518 -0.1351880000 2.9685758668
465 15.8967205984 0.0000118395 1.3752449487 -0.1380010000 2.9692750640
470 15.8995379426 0.0000118521 1.3733339234 -0.1408300000 2.9699518501
475 15.9023738920 0.0000119029 1.3714321137 -0.1436720000 2.9706074942
480 15.9052164581 0.0000119174 1.3695106201 -0.1465290000 2.9712427319
485 15.9080603547 0.0000119396 1.3676005374 -0.1493990000 2.9718583361
490 15.9109145147 0.0000119642 1.3656998390 -0.1522840000 2.9724551924
495 15.9137712169 0.0000119838 1.3637825768 -0.1551830000 2.9730339681
500 15.9166357160 0.0000120030 1.3618503107 -0.1580940000 2.9735954314
505 15.9195026550 0.0000120203 1.3599451788 -0.1610200000 2.9741402059
510 15.9223764106 0.0000120548 1.3580176698 -0.1639590000 2.9746689812
515 15.9252608706 0.0000120788 1.3561028866 -0.1669120000 2.9751824083
520 15.9281471734 0.0000120998 1.3541704432 -0.1698770000 2.9756809880
525 15.9310426850 0.0000121370 1.3522358959 -0.1728550000 2.9761653478
530 15.9339478045 0.0000121473 1.3503028853 -0.1758470000 2.9766360207
535 15.9368493179 0.0000121526 1.3483769615 -0.1788510000 2.9770933972
540 15.9397580508 0.0000122076 1.3464392909 -0.1818680000 2.9775380591
545 15.9426868952 0.0000122322 1.3445051422 -0.1848970000 2.9779705781
550 15.9456084708 0.0000122395 1.3425716279 -0.1879390000 2.9783911620
555 15.9485419069 0.0000122719 1.3406377524 -0.1909940000 2.9788003950
560 15.9514800321 0.0000122825 1.3386939446 -0.1940600000 2.9791986200
565 15.9544196492 0.0000123104 1.3367438063 -0.1971390000 2.9795861983
570 15.9573721670 0.0000123470 1.3348081221 -0.2002300000 2.9799635910
575 15.9603304289 0.0000123581 1.3328544885 -0.2033330000 2.9803310916
580 15.9632893472 0.0000123781 1.3309025188 -0.2064480000 2.9806890023
585 15.9662583024 0.0000124016 1.3289404141 -0.2095750000 2.9810377173
590 15.9692295793 0.0000124283 1.3269832761 -0.2127130000 2.9813774905
595 15.9722124007 0.0000124748 1.3250376521 -0.2158630000 2.9817086854
600 15.9752070617 0.0000124865 1.3230755275 -0.2190240000 2.9820315879
605 15.9781966145 0.0000124923 1.3211062729 -0.2221970000 2.9823463535
610 15.9811952085 0.0000125375 1.3191437513 -0.2253810000 2.9826533436
615 15.9842075195 0.0000125575 1.3171853667 -0.2285770000 2.9829528407
620 15.9872168395 0.0000125777 1.3152120996 -0.2317840000 2.9832449743
625 15.9902399845 0.0000126137 1.3132487996 -0.2350020000 2.9835300880
630 15.9932677221 0.0000126383 1.3112806029 -0.2382310000 2.9838083450
635 15.9963038042 0.0000126573 1.3093025583 -0.2414710000 2.9840799826
640 15.9993418304 0.0000126804 1.3073268834 -0.2447210000 2.9843451672
645 16.0023901285 0.0000127081 1.3053325102 -0.2479830000 2.9846041482
650 16.0054426429 0.0000127324 1.3033499403 -0.2512550000 2.9848570805
655 16.0085037652 0.0000127685 1.3013859850 -0.2545380000 2.9851041722
660 16.0115748000 0.0000127800 1.2993910910 -0.2578320000 2.9853456079
665 16.0146425815 0.0000127945 1.2974010844 -0.2611360000 2.9855814818
670 16.0177218006 0.0000128250 1.2954316398 -0.2644500000 2.9858120419
675 16.0208053777 0.0000128595 1.2934362865 -0.2677750000 2.9860374052
680 16.0239023641 0.0000128819 1.2914306154 -0.2711100000 2.9862577726
685 16.0269979462 0.0000129111 1.2894415865 -0.2744550000 2.9864732111
690 16.0301101422 0.0000129334 1.2874510650 -0.2778120000 2.9866839579
695 16.0332176766 0.0000129549 1.2854399565 -0.2811770000 2.9868900364
700 16.0363413873 0.0000129987 1.2834471164 -0.2845520000 2.9870916859
705 16.0394712364 0.0000130110 1.2814304583 -0.2879380000 2.9872889814
710 16.0426020649 0.0000130303 1.2794347888 -0.2913340000 2.9874820195
715 16.0457424309 0.0000130653 1.2774289706 -0.2947390000 2.9876709611
720 16.0488913584 0.0000130960 1.2754162489 -0.2981540000 2.9878559147
725 16.0520477080 0.0000131164 1.2734015898 -0.3015790000 2.9880369838
730 16.0552076894 0.0000131470 1.2713919223 -0.3050140000 2.9882142562
735 16.0583800385 0.0000131782 1.2693666889 -0.3084580000 2.9883878769
740 16.0615563273 0.0000131974 1.2673492201 -0.3119120000 2.9885579053
745 16.0647391812 0.0000132161 1.2653426465 -0.3153750000 2.9887244483
750 16.0679257358 0.0000132590 1.2633018328 -0.3188480000 2.9888875874
755 16.0711305368 0.0000132962 1.2612956317 -0.3223300000 2.9890474749
760 16.0743362970 0.0000133116 1.2592403012 -0.3258210000 2.9892041218
765 16.0775498100 0.0000133270 1.2572430269 -0.3293220000 2.9893576411
770 16.0807642689 0.0000133613 1.2552182908 -0.3328320000 2.9895080876
775 16.0839956154 0.0000134042 1.2531828999 -0.3363510000 2.9896556024
780 16.0872320678 0.0000134143 1.2511334479 -0.3398800000 2.9898002153
785 16.0904695689 0.0000134347 1.2491077866 -0.3434170000 2.9899419824
790 16.0937171731 0.0000134801 1.2470425350 -0.3469630000 2.9900810126
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment