From c704a9f42aa307cc2d6bededa6ee686c4e83320e Mon Sep 17 00:00:00 2001 From: Aliaksandr Yakutovich Date: Wed, 24 Jul 2024 18:54:52 +0200 Subject: [PATCH] First working version of cleed called from Python. --- .gitignore | 1 + .pre-commit-config.yaml | 2 +- cleedpy/cleed/src/leed.c | 2 +- cleedpy/cli/leed.py | 17 +- cleedpy/interface/cleed.py | 17 +- .../PHASE/Cu_BVH.phs | 201 ++++++++++++++++++ .../PHASE/Ni_BVH.phs | 201 ++++++++++++++++++ .../cleedpy_example_intermediate/leed.inp | 27 +++ examples/cleedpy_example_intermediate/run.sh | 1 + 9 files changed, 456 insertions(+), 13 deletions(-) create mode 100755 examples/cleedpy_example_intermediate/PHASE/Cu_BVH.phs create mode 100755 examples/cleedpy_example_intermediate/PHASE/Ni_BVH.phs create mode 100755 examples/cleedpy_example_intermediate/leed.inp create mode 100755 examples/cleedpy_example_intermediate/run.sh diff --git a/.gitignore b/.gitignore index d6f48d7..6136306 100644 --- a/.gitignore +++ b/.gitignore @@ -213,6 +213,7 @@ dkms.conf # CMake builds cmake-build*/ +cleedpy/cleed/bin/ # Vscode .vscode/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b495d98..fe2d4cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: - id: autoflake - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 24.4.2 hooks: - id: black language_version: python3 diff --git a/cleedpy/cleed/src/leed.c b/cleedpy/cleed/src/leed.c index c3c0dbb..23c3dbf 100644 --- a/cleedpy/cleed/src/leed.c +++ b/cleedpy/cleed/src/leed.c @@ -1,8 +1,8 @@ #include "leed.h" real ** leed( - char * bul_file, char * par_file, + char * bul_file, char *res_file ){ struct cryst_str *bulk=NULL; diff --git a/cleedpy/cli/leed.py b/cleedpy/cli/leed.py index 8c6adf3..83e8e45 100644 --- a/cleedpy/cli/leed.py +++ b/cleedpy/cli/leed.py @@ -3,11 +3,12 @@ import typer from ..config import load_parameters +from ..interface.cleed import call_cleed from ..physics.constants import BOHR_TO_ANGSTROM from ..preprocess import extract_bulk_parameters, transform_cells -def leed(inptut_file: Path): +def leed_bak(inptut_file: Path): """Leed CLI.""" config = load_parameters(inptut_file) transformation_matrix = transform_cells(config) @@ -24,6 +25,20 @@ def leed(inptut_file: Path): ) +def leed( + parameters_file: str = typer.Option( # noqa: B008 + "leed.inp", "--input", "-i", help="Input file with parameters" + ), + bulk_file: str = typer.Option(None, "--bulk", "-b", help="Bulk file"), # noqa: B008 + output_file: str = typer.Option( # noqa: B008 + "leed.out", "--output", "-o", help="Output file" + ), # noqa: B008 +): + """Leed CLI.""" + result = call_cleed(parameters_file, bulk_file, output_file) + print(result) + + def cli(): """Leed CLI.""" typer.run(leed) diff --git a/cleedpy/interface/cleed.py b/cleedpy/interface/cleed.py index 13ee8c6..5c55afd 100644 --- a/cleedpy/interface/cleed.py +++ b/cleedpy/interface/cleed.py @@ -210,20 +210,17 @@ def get_cleed_lib() -> CDLL: return cdll.LoadLibrary(cleed_lib) -def call_cleed() -> None: +def call_cleed(parameters_file, bulk_file, output_file): lib = get_cleed_lib() - lib.my_test_function.argtypes = [c_int, c_int, POINTER(Crystal)] - lib.my_test_function.restype = c_int + lib.leed.argtypes = [c_char_p, c_char_p, c_char_p] + lib.leed.restype = POINTER(POINTER(c_double)) - bulk = Crystal() - bulk.vr = 1.0 - bulk.vi = 2.0 - bulk.temp = 300.0 - - bulk.a = (0.0, 1.0, 2.0, 3.0, 4.0) + result = lib.leed( + parameters_file.encode(), bulk_file.encode(), output_file.encode() + ) - print("Result is ", lib.my_test_function(1, 2, bulk)) + return result if __name__ == "__main__": diff --git a/examples/cleedpy_example_intermediate/PHASE/Cu_BVH.phs b/examples/cleedpy_example_intermediate/PHASE/Cu_BVH.phs new file mode 100755 index 0000000..12b7175 --- /dev/null +++ b/examples/cleedpy_example_intermediate/PHASE/Cu_BVH.phs @@ -0,0 +1,201 @@ +100 9 neng lmax (Cu, 60.70 amu, potential (WAKOH) from potpsb., zero at MT radius) + .2000 + -.4004 -.0443 .0230 .0001 .0000 .0000 .0000 .0000 .0000 + .4000 + -.5627 -.0991 .5529 .0007 .0000 .0000 .0000 .0000 .0000 + .6000 + -.6868 -.1495 2.7533 .0026 .0001 .0000 .0000 .0000 .0000 + .8000 + -.7921 -.1948 2.8340 .0067 .0002 .0000 .0000 .0000 .0000 + 1.0000 + -.8858 -.2357 2.8434 .0137 .0006 .0000 .0000 .0000 .0000 + 1.2000 + -.9716 -.2738 2.8423 .0242 .0013 .0001 .0000 .0000 .0000 + 1.4000 +-1.0516 -.3099 2.8409 .0390 .0024 .0001 .0000 .0000 .0000 + 1.6000 +-1.1269 -.3450 2.8420 .0584 .0041 .0002 .0000 .0000 .0000 + 1.8000 +-1.1983 -.3795 2.8461 .0829 .0065 .0004 .0000 .0000 .0000 + 2.0000 +-1.2665 -.4139 2.8532 .1126 .0097 .0007 .0000 .0000 .0000 + 2.2000 +-1.3317 -.4482 2.8627 .1475 .0138 .0011 .0001 .0000 .0000 + 2.4000 +-1.3942 -.4825 2.8739 .1872 .0190 .0017 .0001 .0000 .0000 + 2.6000 +-1.4543 -.5169 2.8860 .2313 .0253 .0025 .0002 .0000 .0000 + 2.8000 +-1.5121 -.5513 2.8983 .2789 .0329 .0035 .0003 .0000 .0000 + 3.0000 +-1.5678 -.5856 2.9103 .3291 .0417 .0047 .0004 .0000 .0000 + 3.2000 +-1.6214 -.6197 2.9213 .3806 .0518 .0063 .0006 .0000 .0000 + 3.4000 +-1.6731 -.6536 2.9311 .4325 .0633 .0082 .0008 .0001 .0000 + 3.6000 +-1.7229 -.6871 2.9394 .4836 .0760 .0104 .0011 .0001 .0000 + 3.8000 +-1.7710 -.7201 2.9460 .5330 .0901 .0131 .0015 .0001 .0000 + 4.0000 +-1.8173 -.7527 2.9509 .5800 .1053 .0162 .0020 .0002 .0000 + 4.2000 +-1.8620 -.7846 2.9542 .6241 .1216 .0197 .0026 .0003 .0000 + 4.4000 +-1.9052 -.8160 2.9559 .6652 .1389 .0238 .0032 .0003 .0000 + 4.6000 +-1.9468 -.8466 2.9563 .7031 .1570 .0283 .0040 .0005 .0000 + 4.8000 +-1.9869 -.8766 2.9554 .7379 .1758 .0333 .0050 .0006 .0001 + 5.0000 +-2.0256 -.9058 2.9534 .7699 .1951 .0389 .0061 .0007 .0001 + 5.2000 +-2.0630 -.9342 2.9505 .7993 .2147 .0449 .0074 .0009 .0001 + 5.4000 +-2.0991 -.9619 2.9468 .8264 .2345 .0515 .0088 .0012 .0001 + 5.6000 +-2.1339 -.9887 2.9425 .8515 .2542 .0585 .0105 .0015 .0002 + 5.8000 +-2.1675-1.0148 2.9378 .8748 .2739 .0661 .0123 .0018 .0002 + 6.0000 +-2.2000-1.0401 2.9327 .8967 .2932 .0741 .0144 .0022 .0003 + 6.2000 +-2.2314-1.0646 2.9274 .9174 .3120 .0825 .0166 .0026 .0003 + 6.4000 +-2.2618-1.0883 2.9219 .9371 .3303 .0914 .0191 .0031 .0004 + 6.6000 +-2.2911-1.1113 2.9164 .9560 .3480 .1005 .0219 .0037 .0005 + 6.8000 +-2.3195-1.1335 2.9110 .9742 .3650 .1101 .0248 .0044 .0006 + 7.0000 +-2.3470-1.1550 2.9056 .9920 .3813 .1198 .0281 .0051 .0007 + 7.2000 +-2.3737-1.1759 2.9003 1.0094 .3968 .1298 .0315 .0059 .0009 + 7.4000 +-2.3996-1.1960 2.8952 1.0264 .4115 .1400 .0353 .0068 .0010 + 7.6000 +-2.4247-1.2156 2.8903 1.0432 .4255 .1503 .0392 .0079 .0012 + 7.8000 +-2.4491-1.2345 2.8857 1.0598 .4387 .1607 .0434 .0090 .0015 + 8.0000 +-2.4728-1.2528 2.8812 1.0761 .4513 .1711 .0478 .0102 .0017 + 8.2000 +-2.4959-1.2707 2.8770 1.0922 .4631 .1815 .0525 .0116 .0020 + 8.4000 +-2.5184-1.2880 2.8730 1.1081 .4744 .1918 .0574 .0130 .0023 + 8.6000 +-2.5404-1.3048 2.8693 1.1238 .4850 .2019 .0625 .0146 .0027 + 8.8000 +-2.5619-1.3212 2.8657 1.1392 .4952 .2120 .0677 .0163 .0031 + 9.0000 +-2.5829-1.3371 2.8624 1.1542 .5048 .2218 .0732 .0182 .0035 + 9.2000 +-2.6034-1.3527 2.8592 1.1690 .5141 .2315 .0788 .0201 .0040 + 9.4000 +-2.6236-1.3680 2.8562 1.1833 .5230 .2408 .0846 .0222 .0045 + 9.6000 +-2.6433-1.3829 2.8533 1.1973 .5315 .2500 .0905 .0244 .0051 + 9.8000 +-2.6627-1.3975 2.8505 1.2109 .5398 .2588 .0965 .0268 .0058 +10.0000 +-2.6818-1.4118 2.8479 1.2240 .5479 .2673 .1026 .0293 .0065 +10.2000 +-2.7006-1.4259 2.8452 1.2366 .5558 .2756 .1088 .0319 .0072 +10.4000 +-2.7191-1.4397 2.8427 1.2487 .5635 .2835 .1151 .0347 .0081 +10.6000 +-2.7373-1.4533 2.8401 1.2604 .5711 .2911 .1213 .0376 .0089 +10.8000 +-2.7553-1.4668 2.8375 1.2715 .5786 .2984 .1276 .0406 .0099 +11.0000 +-2.7730-1.4801 2.8350 1.2821 .5860 .3054 .1339 .0437 .0109 +11.2000 +-2.7905-1.4932 2.8324 1.2923 .5935 .3121 .1402 .0470 .0120 +11.4000 +-2.8078-1.5061 2.8297 1.3019 .6008 .3186 .1465 .0503 .0132 +11.6000 +-2.8249-1.5190 2.8270 1.3111 .6082 .3247 .1526 .0538 .0144 +11.8000 +-2.8418-1.5317 2.8243 1.3198 .6156 .3306 .1587 .0574 .0157 +12.0000 +-2.8585-1.5442 2.8215 1.3281 .6230 .3363 .1648 .0610 .0171 +12.2000 +-2.8750-1.5567 2.8185 1.3360 .6303 .3418 .1707 .0648 .0186 +12.4000 +-2.8914-1.5691 2.8156 1.3434 .6377 .3470 .1765 .0686 .0202 +12.6000 +-2.9076-1.5813 2.8125 1.3505 .6451 .3521 .1822 .0725 .0218 +12.8000 +-2.9236-1.5935 2.8093 1.3573 .6525 .3570 .1878 .0765 .0235 +13.0000 +-2.9395-1.6056 2.8061 1.3638 .6599 .3617 .1932 .0805 .0253 +13.2000 +-2.9552-1.6176 2.8028 1.3699 .6673 .3663 .1985 .0845 .0271 +13.4000 +-2.9707-1.6294 2.7994 1.3758 .6746 .3708 .2037 .0886 .0291 +13.6000 +-2.9861-1.6412 2.7960 1.3815 .6820 .3752 .2086 .0928 .0311 +13.8000 +-3.0013-1.6529 2.7925 1.3870 .6893 .3795 .2135 .0969 .0332 +14.0000 +-3.0163-1.6645 2.7889 1.3922 .6965 .3837 .2182 .1011 .0353 +14.2000 +-3.0312-1.6760 2.7853 1.3973 .7036 .3879 .2227 .1052 .0376 +14.4000 +-3.0460-1.6874 2.7817 1.4022 .7107 .3920 .2271 .1094 .0399 +14.6000 +-3.0606-1.6987 2.7780 1.4070 .7177 .3961 .2313 .1135 .0422 +14.8000 +-3.0750-1.7098 2.7743 1.4117 .7246 .4001 .2354 .1176 .0447 +15.0000 +-3.0892-1.7209 2.7706 1.4163 .7314 .4042 .2393 .1217 .0471 +15.2000 +-3.1033-1.7319 2.7669 1.4208 .7380 .4082 .2431 .1258 .0497 +15.4000 +-3.1173-1.7427 2.7632 1.4252 .7446 .4122 .2468 .1298 .0523 +15.6000 +-3.1310-1.7534 2.7595 1.4295 .7510 .4163 .2503 .1337 .0549 +15.8000 +-3.1446-1.7640 2.7558 1.4338 .7572 .4204 .2537 .1376 .0576 +16.0000 +-3.1581-1.7745 2.7521 1.4381 .7633 .4244 .2571 .1414 .0604 +16.2000 +-3.1714-1.7849 2.7485 1.4422 .7692 .4285 .2603 .1452 .0632 +16.4000 +-3.1845-1.7951 2.7449 1.4464 .7750 .4327 .2634 .1489 .0660 +16.6000 +-3.1974-1.8053 2.7414 1.4505 .7807 .4368 .2664 .1525 .0688 +16.8000 +-3.2102-1.8153 2.7379 1.4545 .7862 .4410 .2693 .1560 .0717 +17.0000 +-3.2228-1.8251 2.7344 1.4586 .7915 .4452 .2722 .1595 .0745 +17.2000 +-3.2353-1.8349 2.7310 1.4625 .7966 .4494 .2750 .1628 .0774 +17.4000 +-3.2476-1.8445 2.7277 1.4665 .8017 .4536 .2777 .1661 .0803 +17.6000 +-3.2598-1.8539 2.7244 1.4704 .8065 .4578 .2804 .1694 .0832 +17.8000 +-3.2718-1.8633 2.7212 1.4742 .8113 .4621 .2830 .1724 .0862 +18.0000 +-3.2836-1.8725 2.7180 1.4780 .8158 .4663 .2856 .1755 .0891 +18.2000 +-3.2953-1.8816 2.7149 1.4818 .8203 .4705 .2882 .1784 .0920 +18.4000 +-3.3068-1.8906 2.7119 1.4855 .8246 .4748 .2907 .1813 .0949 +18.6000 +-3.3182-1.8994 2.7089 1.4891 .8288 .4791 .2933 .1840 .0978 +18.8000 +-3.3294-1.9081 2.7060 1.4927 .8329 .4833 .2958 .1867 .1006 +19.0000 +-3.3405-1.9167 2.7032 1.4962 .8369 .4875 .2983 .1893 .1035 +19.2000 +-3.3515-1.9252 2.7004 1.4996 .8408 .4917 .3008 .1918 .1063 +19.4000 +-3.3623-1.9335 2.6977 1.5030 .8446 .4958 .3032 .1943 .1091 +19.6000 +-3.3730-1.9418 2.6950 1.5062 .8483 .4999 .3057 .1966 .1118 +19.8000 +-3.3836-1.9499 2.6924 1.5094 .8519 .5040 .3083 .1990 .1145 +20.0000 +-3.3940-1.9579 2.6899 1.5125 .8555 .5081 .3108 .2012 .1172 diff --git a/examples/cleedpy_example_intermediate/PHASE/Ni_BVH.phs b/examples/cleedpy_example_intermediate/PHASE/Ni_BVH.phs new file mode 100755 index 0000000..fe389b0 --- /dev/null +++ b/examples/cleedpy_example_intermediate/PHASE/Ni_BVH.phs @@ -0,0 +1,201 @@ +100 9 neng lmax (Ni, 58.70 amu, potential (WAKOH) from potpsb., zero at MT radius) + .2000 + -.4332 -.0514 .0400 .0001 .0000 .0000 .0000 .0000 .0000 .0000 + .4000 + -.6049 -.1141 -.4683 .0007 .0000 .0000 .0000 .0000 .0000 .0000 + .6000 + -.7338 -.1711 -.2518 .0029 .0001 .0000 .0000 .0000 .0000 .0000 + .8000 + -.8416 -.2214 -.2495 .0073 .0003 .0000 .0000 .0000 .0000 .0000 + 1.0000 + -.9367 -.2662 -.2608 .0150 .0007 .0000 .0000 .0000 .0000 .0000 + 1.2000 +-1.0230 -.3070 -.2717 .0268 .0014 .0001 .0000 .0000 .0000 .0000 + 1.4000 +-1.1031 -.3451 -.2789 .0432 .0026 .0001 .0000 .0000 .0000 .0000 + 1.6000 +-1.1783 -.3814 -.2818 .0651 .0044 .0003 .0000 .0000 .0000 .0000 + 1.8000 +-1.2495 -.4166 -.2805 .0927 .0070 .0005 .0000 .0000 .0000 .0000 + 2.0000 +-1.3174 -.4514 -.2755 .1264 .0105 .0008 .0000 .0000 .0000 .0000 + 2.2000 +-1.3824 -.4859 -.2675 .1662 .0150 .0012 .0001 .0000 .0000 .0000 + 2.4000 +-1.4448 -.5203 -.2574 .2117 .0206 .0018 .0001 .0000 .0000 .0000 + 2.6000 +-1.5048 -.5546 -.2460 .2623 .0275 .0027 .0002 .0000 .0000 .0000 + 2.8000 +-1.5627 -.5889 -.2342 .3170 .0358 .0037 .0003 .0000 .0000 .0000 + 3.0000 +-1.6184 -.6232 -.2226 .3744 .0455 .0051 .0005 .0000 .0000 .0000 + 3.2000 +-1.6722 -.6573 -.2118 .4332 .0566 .0068 .0006 .0000 .0000 .0000 + 3.4000 +-1.7241 -.6912 -.2023 .4919 .0693 .0088 .0009 .0001 .0000 .0000 + 3.6000 +-1.7742 -.7247 -.1943 .5492 .0834 .0112 .0012 .0001 .0000 .0000 + 3.8000 +-1.8226 -.7579 -.1879 .6039 .0989 .0141 .0016 .0001 .0000 .0000 + 4.0000 +-1.8694 -.7907 -.1833 .6553 .1157 .0175 .0021 .0002 .0000 .0000 + 4.2000 +-1.9146 -.8229 -.1803 .7029 .1338 .0213 .0027 .0003 .0000 .0000 + 4.4000 +-1.9582 -.8545 -.1789 .7466 .1530 .0257 .0035 .0004 .0000 .0000 + 4.6000 +-2.0003 -.8855 -.1790 .7864 .1731 .0306 .0043 .0005 .0000 .0000 + 4.8000 +-2.0411 -.9158 -.1803 .8225 .1940 .0360 .0053 .0006 .0001 .0000 + 5.0000 +-2.0804 -.9455 -.1827 .8553 .2154 .0421 .0065 .0008 .0001 .0000 + 5.2000 +-2.1184 -.9744 -.1861 .8850 .2372 .0487 .0079 .0010 .0001 .0000 + 5.4000 +-2.1551-1.0025 -.1903 .9122 .2592 .0558 .0094 .0013 .0001 .0000 + 5.6000 +-2.1906-1.0299 -.1951 .9371 .2811 .0635 .0112 .0016 .0002 .0000 + 5.8000 +-2.2249-1.0565 -.2004 .9602 .3028 .0718 .0132 .0019 .0002 .0000 + 6.0000 +-2.2580-1.0823 -.2061 .9817 .3241 .0806 .0154 .0023 .0003 .0000 + 6.2000 +-2.2900-1.1074 -.2120 1.0019 .3449 .0898 .0179 .0028 .0003 .0000 + 6.4000 +-2.3210-1.1317 -.2181 1.0211 .3650 .0995 .0206 .0033 .0004 .0000 + 6.6000 +-2.3510-1.1552 -.2241 1.0394 .3844 .1096 .0235 .0040 .0005 .0001 + 6.8000 +-2.3800-1.1780 -.2302 1.0571 .4029 .1200 .0267 .0047 .0006 .0001 + 7.0000 +-2.4081-1.2001 -.2362 1.0743 .4206 .1307 .0302 .0054 .0008 .0001 + 7.2000 +-2.4353-1.2215 -.2420 1.0911 .4374 .1417 .0340 .0063 .0009 .0001 + 7.4000 +-2.4617-1.2422 -.2477 1.1075 .4533 .1529 .0380 .0073 .0011 .0001 + 7.6000 +-2.4873-1.2622 -.2531 1.1237 .4684 .1642 .0423 .0084 .0013 .0002 + 7.8000 +-2.5122-1.2817 -.2583 1.1395 .4826 .1756 .0468 .0096 .0016 .0002 + 8.0000 +-2.5364-1.3005 -.2633 1.1552 .4959 .1871 .0516 .0109 .0018 .0002 + 8.2000 +-2.5599-1.3188 -.2680 1.1706 .5086 .1985 .0567 .0124 .0021 .0003 + 8.4000 +-2.5828-1.3365 -.2725 1.1858 .5205 .2098 .0620 .0139 .0025 .0003 + 8.6000 +-2.6052-1.3537 -.2767 1.2006 .5318 .2210 .0675 .0156 .0028 .0004 + 8.8000 +-2.6270-1.3705 -.2807 1.2152 .5425 .2320 .0733 .0175 .0033 .0005 + 9.0000 +-2.6483-1.3868 -.2845 1.2295 .5526 .2428 .0792 .0194 .0037 .0006 + 9.2000 +-2.6691-1.4027 -.2881 1.2433 .5623 .2533 .0853 .0216 .0043 .0007 + 9.4000 +-2.6895-1.4182 -.2915 1.2568 .5716 .2636 .0916 .0238 .0048 .0008 + 9.6000 +-2.7095-1.4334 -.2948 1.2698 .5805 .2736 .0981 .0262 .0055 .0009 + 9.8000 +-2.7291-1.4482 -.2979 1.2824 .5891 .2832 .1046 .0288 .0061 .0010 +10.0000 +-2.7483-1.4628 -.3009 1.2945 .5975 .2925 .1113 .0315 .0069 .0012 +10.2000 +-2.7673-1.4770 -.3038 1.3062 .6057 .3015 .1181 .0343 .0077 .0014 +10.4000 +-2.7859-1.4910 -.3067 1.3173 .6137 .3101 .1249 .0373 .0086 .0016 +10.6000 +-2.8042-1.5048 -.3096 1.3279 .6215 .3184 .1318 .0404 .0095 .0018 +10.8000 +-2.8223-1.5184 -.3124 1.3380 .6293 .3263 .1387 .0436 .0106 .0020 +11.0000 +-2.8401-1.5318 -.3152 1.3476 .6369 .3339 .1455 .0470 .0117 .0023 +11.2000 +-2.8577-1.5450 -.3180 1.3567 .6445 .3412 .1524 .0505 .0128 .0026 +11.4000 +-2.8751-1.5581 -.3209 1.3653 .6521 .3482 .1592 .0542 .0141 .0029 +11.6000 +-2.8922-1.5710 -.3238 1.3734 .6597 .3548 .1660 .0579 .0154 .0032 +11.8000 +-2.9092-1.5838 -.3268 1.3812 .6672 .3612 .1727 .0618 .0168 .0036 +12.0000 +-2.9260-1.5964 -.3298 1.3884 .6748 .3673 .1793 .0658 .0183 .0040 +12.2000 +-2.9425-1.6089 -.3329 1.3953 .6823 .3732 .1858 .0698 .0199 .0045 +12.4000 +-2.9589-1.6214 -.3361 1.4018 .6898 .3788 .1921 .0740 .0216 .0049 +12.6000 +-2.9752-1.6337 -.3394 1.4080 .6973 .3843 .1984 .0782 .0233 .0054 +12.8000 +-2.9913-1.6459 -.3427 1.4139 .7048 .3895 .2044 .0825 .0251 .0060 +13.0000 +-3.0072-1.6580 -.3461 1.4194 .7123 .3946 .2104 .0869 .0270 .0066 +13.2000 +-3.0229-1.6700 -.3496 1.4247 .7198 .3995 .2162 .0913 .0291 .0072 +13.4000 +-3.0385-1.6819 -.3532 1.4298 .7272 .4043 .2218 .0958 .0311 .0079 +13.6000 +-3.0539-1.6938 -.3568 1.4346 .7346 .4089 .2272 .1003 .0333 .0086 +13.8000 +-3.0692-1.7055 -.3605 1.4392 .7419 .4135 .2325 .1048 .0356 .0094 +14.0000 +-3.0844-1.7172 -.3642 1.4437 .7491 .4180 .2376 .1093 .0379 .0102 +14.2000 +-3.0993-1.7287 -.3680 1.4480 .7562 .4224 .2426 .1138 .0403 .0110 +14.4000 +-3.1141-1.7402 -.3718 1.4522 .7633 .4268 .2474 .1184 .0428 .0120 +14.6000 +-3.1288-1.7515 -.3757 1.4563 .7703 .4311 .2520 .1229 .0453 .0129 +14.8000 +-3.1433-1.7628 -.3796 1.4602 .7771 .4354 .2564 .1274 .0479 .0139 +15.0000 +-3.1577-1.7739 -.3834 1.4641 .7838 .4397 .2607 .1318 .0506 .0150 +15.2000 +-3.1719-1.7849 -.3873 1.4679 .7903 .4439 .2649 .1362 .0534 .0161 +15.4000 +-3.1859-1.7959 -.3912 1.4717 .7968 .4482 .2689 .1406 .0562 .0173 +15.6000 +-3.1998-1.8067 -.3951 1.4754 .8030 .4524 .2727 .1449 .0591 .0185 +15.8000 +-3.2135-1.8174 -.3990 1.4790 .8091 .4567 .2764 .1492 .0620 .0197 +16.0000 +-3.2271-1.8280 -.4028 1.4827 .8151 .4610 .2800 .1534 .0649 .0211 +16.2000 +-3.2405-1.8385 -.4066 1.4863 .8208 .4653 .2835 .1575 .0679 .0224 +16.4000 +-3.2538-1.8488 -.4104 1.4898 .8265 .4696 .2869 .1615 .0710 .0239 +16.6000 +-3.2668-1.8590 -.4142 1.4933 .8319 .4739 .2902 .1655 .0741 .0254 +16.8000 +-3.2798-1.8692 -.4178 1.4968 .8372 .4782 .2934 .1693 .0772 .0269 +17.0000 +-3.2926-1.8791 -.4215 1.5003 .8423 .4826 .2965 .1731 .0803 .0285 +17.2000 +-3.3052-1.8890 -.4251 1.5037 .8473 .4870 .2995 .1768 .0834 .0301 +17.4000 +-3.3176-1.8987 -.4286 1.5072 .8521 .4914 .3025 .1804 .0866 .0318 +17.6000 +-3.3299-1.9083 -.4320 1.5105 .8567 .4957 .3054 .1839 .0897 .0336 +17.8000 +-3.3421-1.9178 -.4354 1.5139 .8612 .5001 .3082 .1873 .0929 .0353 +18.0000 +-3.3540-1.9271 -.4388 1.5172 .8656 .5045 .3110 .1906 .0961 .0372 +18.2000 +-3.3659-1.9363 -.4420 1.5204 .8698 .5089 .3138 .1938 .0992 .0390 +18.4000 +-3.3776-1.9454 -.4452 1.5236 .8739 .5133 .3165 .1969 .1024 .0410 +18.6000 +-3.3891-1.9544 -.4483 1.5267 .8778 .5176 .3192 .2000 .1055 .0429 +18.8000 +-3.4005-1.9632 -.4514 1.5298 .8817 .5220 .3219 .2029 .1086 .0449 +19.0000 +-3.4117-1.9719 -.4544 1.5329 .8854 .5263 .3246 .2057 .1117 .0470 +19.2000 +-3.4228-1.9805 -.4573 1.5358 .8891 .5306 .3273 .2085 .1148 .0490 +19.4000 +-3.4338-1.9890 -.4602 1.5387 .8926 .5348 .3299 .2112 .1178 .0512 +19.6000 +-3.4446-1.9973 -.4630 1.5415 .8961 .5390 .3326 .2138 .1208 .0533 +19.8000 +-3.4553-2.0056 -.4658 1.5442 .8995 .5432 .3353 .2163 .1238 .0555 +20.0000 +-3.4658-2.0137 -.4685 1.5469 .9028 .5473 .3380 .2188 .1267 .0577 diff --git a/examples/cleedpy_example_intermediate/leed.inp b/examples/cleedpy_example_intermediate/leed.inp new file mode 100755 index 0000000..6ef2aad --- /dev/null +++ b/examples/cleedpy_example_intermediate/leed.inp @@ -0,0 +1,27 @@ +c: Ni(111) +a1: 1.2450 2.1564 0.0000 +a2: 1.2450 -2.1564 0.0000 +a3: 0.0000 0.0000 -6.0990 +m1: 1. 0. +m2: 0. 1. +po: Cu_BVH 0.0000 -0.0000 6.0900 dr3 0.032 0.032 0.032 +po: Ni_BVH 1.2450 -0.7188 4.0600 dr3 0.025 0.025 0.025 +po: Ni_BVH 1.2450 0.7188 2.0300 dr3 0.025 0.025 0.025 +rm: Ni_BVH 0.90 +rm: Cu_BVH 0.90 +zr: 1.60 7.00 +sz: 1 +sr: 3 0.0 0.0 +vr: -8.00 +vi: 4.00 +pb: Ni_BVH 0.0000 +0.0000 0.0000 dr3 0.025 0.025 0.025 +pb: Ni_BVH 1.2450 -0.7188 -2.0330 dr3 0.025 0.025 0.025 +pb: Ni_BVH 1.2450 +0.7188 -4.0660 dr3 0.025 0.025 0.025 +# +ei: 70. +ef: 498.1 +es: 4. +it: 0. +ip: 0. +ep: 1.e-2 +lm: 9 diff --git a/examples/cleedpy_example_intermediate/run.sh b/examples/cleedpy_example_intermediate/run.sh new file mode 100755 index 0000000..e4f5f8a --- /dev/null +++ b/examples/cleedpy_example_intermediate/run.sh @@ -0,0 +1 @@ +cleedpy-leed -i leed.inp -b leed.inp -o leed.res