├── .gitattributes
├── .github
└── workflows
│ ├── benchmarks.yaml
│ ├── coreTests_LinuxUbuntu.yaml
│ ├── coreTests_MacM1.yaml
│ ├── coreTests_Windows.yaml
│ ├── fullTest.yaml
│ ├── publishPyPI.yaml
│ └── weeklyTesting.yaml
├── .gitignore
├── .readthedocs.yaml
├── CITATION.cff
├── LICENSE.md
├── MANIFEST.in
├── README.md
├── docs
├── Makefile
├── _static
│ ├── KS2022.png
│ ├── KS2022_dilute.png
│ ├── KS2022_randomSolution.png
│ ├── SIPFENN_logo_small.png
│ └── pySIPFENN_MainSchematic.png
├── changelog.rst
├── conf.py
├── contributing.md
├── docs_requirements.txt
├── examples
│ ├── assets
│ │ ├── 112-Cr12Fe10Ni8.png
│ │ ├── SigmaSQS_plots.png
│ │ └── neuralnetcolorized.png
│ └── sipfenn_examples.ipynb
├── exportingmodels.md
├── faq.md
├── index.rst
├── install.md
├── make.bat
├── miscellaneousnotes.md
└── source
│ ├── modules.rst
│ ├── pysipfenn.core.rst
│ ├── pysipfenn.descriptorDefinitions.rst
│ ├── pysipfenn.modelsSIPFENN.rst
│ ├── pysipfenn.rst
│ └── pysipfenn.tests.rst
├── example.workshop2023Feb
├── README.md
├── assets
│ ├── 112-Cr12Fe10Ni8.png
│ ├── NN20_SigmaTransfer_3.png
│ ├── NN20_sigmasqs.png
│ ├── SigmaSQS_plots.png
│ ├── neuralnetcolorized.png
│ └── transferLearning_vs_datapoints_LinLinOQMD.png
├── sipfenn_examples.ipynb
└── sipfenn_examples_clean.ipynb
├── pyproject.toml
└── pysipfenn
├── __init__.py
├── core
├── __init__.py
├── modelAdjusters.py
├── modelExporters.py
└── pysipfenn.py
├── descriptorDefinitions
├── KS2022.py
├── KS2022_dilute.py
├── KS2022_randomSolutions.py
├── README.md
├── Ward2017.py
├── __init__.py
├── assets
│ └── KS2022_randomSolution_ConvergencePlot.png
├── element_properties_Ward2017KS2022.csv
├── labels_KS2022.csv
├── labels_KS2022_dilute.csv
├── labels_KS2022_randomSolutions.csv
├── labels_Ward2017.csv
└── property_names_Ward2017KS2022.txt
├── misc
├── __init__.py
├── conveniences.py
└── prototypeLibrary.yaml
├── modelsSIPFENN
├── README.md
├── __init__.py
└── models.json
└── tests
├── __init__.py
├── testCaseFiles
├── AdjusterTestDescriptors.csv
├── AdjusterTestDescriptors.npy
├── AdjusterTestTargets.csv
├── AdjusterTestTargets.npy
├── TestFile_DescriptorData_4_KS2022_labeled_enumerated.csv
├── TestFile_DescriptorData_4_KS2022_labeled_named.csv
├── TestFile_DescriptorData_KS2022_randomSolution_valueRangesMeans.csv
├── exampleInputFiles
│ ├── 0-Cr8Fe18Ni4.POSCAR
│ ├── 1-Cr16Fe8Ni6.POSCAR
│ ├── 10-Ce4Ti4O12.POSCAR
│ ├── 11-Fe10Ni20.POSCAR
│ ├── 12-Gd4Cr4O12.POSCAR
│ ├── 13-Fe16Ni14.POSCAR
│ ├── 14-Fe24Ni6.POSCAR
│ ├── 15-Ta4Tl4O12.POSCAR
│ ├── 16-Fe18Ni12.POSCAR
│ ├── 17-Pr4Ga4O12.POSCAR
│ ├── 18-Fe28Ni2.POSCAR
│ ├── 19-Fe4Ni26.POSCAR
│ ├── 2-Fe8Ni22.POSCAR
│ ├── 20-Fe8Ni22.POSCAR
│ ├── 21-Fe10Ni20.POSCAR
│ ├── 22-Fe10Ni20.POSCAR
│ ├── 23-Fe12Ni18.POSCAR
│ ├── 24-Fe16Ni14.POSCAR
│ ├── 25-Fe12Ni18.POSCAR
│ ├── 26-Fe8Ni22.POSCAR
│ ├── 27-Cr28Fe2.POSCAR
│ ├── 28-Fe26Ni4.POSCAR
│ ├── 29-Fe12Ni18.POSCAR
│ ├── 3-Cr18Fe12.POSCAR
│ ├── 30-Cr26Fe4.POSCAR
│ ├── 4-Fe30.POSCAR
│ ├── 5-Cr22Fe8.POSCAR
│ ├── 6-Fe2Ni28.POSCAR
│ ├── 7-Cr18Fe12.POSCAR
│ ├── 8-Cr2Fe16Ni12.POSCAR
│ └── 9-Pb8O12.POSCAR
├── exampleInputFilesDescriptorTable.csv
├── exampleInputFiles_500atom
│ ├── 1-Zr220Cu280.POSCAR
│ ├── 2-Zr220Cu280.POSCAR
│ └── 3-Zr220Cu280.POSCAR
└── prototypeLibrary-custom.yaml
├── test_AllCompatibleONNX_Ward2017.py
├── test_Core_prototypeLibrary.py
├── test_KS2022.py
├── test_KS2022_dilute.py
├── test_KS2022_randomSolutions.py
├── test_Krajewski2020_NN9NN20NN24_ONNX.py
├── test_ModelAdjusters.py
├── test_ModelExporters.py
├── test_Ward2017.py
├── test_customModel.py
└── test_pysipfenn.py
/.gitattributes:
--------------------------------------------------------------------------------
1 | example.workshop2023Feb/** linguist-vendored
2 | docs/** linguist-vendored
3 |
4 | *.ipynb linguist-language=Python
--------------------------------------------------------------------------------
/.github/workflows/benchmarks.yaml:
--------------------------------------------------------------------------------
1 | name: Small Benchmarks
2 |
3 | on:
4 | push:
5 | paths:
6 | - 'pysipfenn/descriptorDefinitions/**'
7 | - '.github/workflows/benchmarks.yaml'
8 | workflow_dispatch:
9 |
10 | jobs:
11 | benchmark:
12 | strategy:
13 | matrix:
14 | python-version: ["3.9", "3.10", "3.11"]
15 | fail-fast: false
16 | runs-on: ubuntu-22.04
17 | steps:
18 | - uses: actions/checkout@v4
19 |
20 | - name: Set up Python ${{ matrix.python-version }}
21 | uses: actions/setup-python@v5
22 | with:
23 | python-version: ${{ matrix.python-version }}
24 | cache: 'pip'
25 | cache-dependency-path: 'pyproject.toml'
26 |
27 | - name: Install dependencies
28 | run: |
29 | python -m pip install --upgrade pip
30 | python -m pip install --upgrade setuptools
31 | python -m pip install wheel flask
32 | python -m pip install -e .
33 |
34 | - name: Benchmark KS2022
35 | run: python -c "from pysipfenn.descriptorDefinitions import KS2022; KS2022.profile(test='JVASP-10001', nRuns=100); KS2022.profile(test='diluteNiAlloy', nRuns=100)"
36 |
37 | - name: Benchmark Ward2017
38 | run: python -c "from pysipfenn.descriptorDefinitions import Ward2017; Ward2017.profile(test='JVASP-10001', nRuns=100); Ward2017.profile(test='diluteNiAlloy', nRuns=100)"
39 |
40 | - name: Benchmark KS2022 dilute featurizer
41 | run: python -c "from pysipfenn.descriptorDefinitions import KS2022_dilute; KS2022_dilute.profile(test='diluteNiAlloy', nRuns=250)"
42 |
43 |
--------------------------------------------------------------------------------
/.github/workflows/coreTests_LinuxUbuntu.yaml:
--------------------------------------------------------------------------------
1 | name: Linux
2 |
3 | on:
4 | push:
5 | paths:
6 | - 'pysipfenn/**'
7 | - '.github/workflows/coreTests_LinuxUbuntu.yaml'
8 | workflow_dispatch:
9 |
10 | jobs:
11 | coreTest:
12 | strategy:
13 | matrix:
14 | python-version: ["3.9", "3.10", "3.11"]
15 | fail-fast: false
16 | runs-on: ubuntu-latest
17 | steps:
18 | - uses: actions/checkout@v4
19 |
20 | - name: Set up Python ${{ matrix.python-version }}
21 | uses: actions/setup-python@v5
22 | with:
23 | python-version: ${{ matrix.python-version }}
24 | cache: 'pip'
25 | cache-dependency-path: 'pyproject.toml'
26 |
27 | - name: Install dependencies
28 | run: |
29 | python -m pip install --upgrade pip
30 | python -m pip install --upgrade setuptools
31 | python -m pip install wheel flask pytest
32 | python -m pip install -e .
33 | - name: Test with pytest
34 | run: |
35 | pytest --durations=0
36 |
--------------------------------------------------------------------------------
/.github/workflows/coreTests_MacM1.yaml:
--------------------------------------------------------------------------------
1 | name: Mac M1
2 |
3 | on:
4 | push:
5 | paths:
6 | - 'pysipfenn/**'
7 | - '.github/workflows/coreTests_MacM1.yaml'
8 | workflow_dispatch:
9 |
10 | jobs:
11 | coreTest:
12 | strategy:
13 | matrix:
14 | python-version: ["3.10", "3.11"]
15 | fail-fast: false
16 | runs-on: macos-latest
17 | steps:
18 | - uses: actions/checkout@v4
19 |
20 | - name: Set up Python ${{ matrix.python-version }}
21 | uses: actions/setup-python@v5
22 | with:
23 | python-version: ${{ matrix.python-version }}
24 | cache: 'pip'
25 | cache-dependency-path: 'pyproject.toml'
26 |
27 | - name: Install dependencies
28 | run: |
29 | python -m pip install --upgrade pip
30 | python -m pip install --upgrade setuptools
31 | python -m pip install wheel flask pytest
32 | python -m pip install -e .
33 | - name: Test with pytest
34 | run: |
35 | pytest --durations=0
36 |
--------------------------------------------------------------------------------
/.github/workflows/coreTests_Windows.yaml:
--------------------------------------------------------------------------------
1 | name: Windows
2 |
3 | on:
4 | push:
5 | paths:
6 | - 'pysipfenn/**'
7 | - '.github/workflows/coreTests_Windows.yaml'
8 | workflow_dispatch:
9 |
10 | jobs:
11 | coreTest:
12 | strategy:
13 | matrix:
14 | python-version: ["3.9", "3.10", "3.11"]
15 | fail-fast: false
16 | runs-on: windows-latest
17 | steps:
18 | - uses: actions/checkout@v4
19 |
20 | - name: Set up Python ${{ matrix.python-version }}
21 | uses: actions/setup-python@v5
22 | with:
23 | python-version: ${{ matrix.python-version }}
24 | cache: 'pip'
25 | cache-dependency-path: 'pyproject.toml'
26 |
27 | - name: Install dependencies
28 | run: |
29 | python -m pip install --upgrade pip
30 | python -m pip install --upgrade setuptools
31 | python -m pip install wheel flask pytest
32 | python -m pip install -e .
33 | - name: Test with pytest
34 | run: |
35 | pytest --durations=0
36 |
--------------------------------------------------------------------------------
/.github/workflows/fullTest.yaml:
--------------------------------------------------------------------------------
1 | name: Full Test
2 |
3 | on:
4 | pull_request:
5 | branches:
6 | - main
7 | push:
8 | paths:
9 | - '.github/workflows/fullTest.yaml'
10 | workflow_dispatch:
11 |
12 | jobs:
13 | testPython310:
14 | runs-on: macos-13
15 | steps:
16 | - uses: actions/checkout@v4
17 |
18 | - name: Set up Python 3.10
19 | uses: actions/setup-python@v5
20 | with:
21 | python-version: '3.10'
22 | cache: 'pip'
23 | cache-dependency-path: 'pyproject.toml'
24 |
25 | - name: Install Dependencies
26 | run: |
27 | python -m pip install --upgrade pip
28 | python -m pip install --upgrade setuptools
29 | python -m pip install wheel flask pytest
30 | python -m pip install -e ".[dev]"
31 |
32 | - name: Download Models
33 | id: DownloadModelsAttempt1
34 | run: python -c "import pysipfenn; c = pysipfenn.Calculator(); c.downloadModels(); c.loadModels();"
35 | continue-on-error: true
36 |
37 | - name: Download Models Retry if failed the first time
38 | if: failure()
39 | run: python -c "import time; time.sleep(120); import pysipfenn; c = pysipfenn.Calculator(autoLoad=False); c.downloadModels(); c.loadModels();"
40 |
41 | - name: Test with pytest
42 | run: pytest --durations=0
43 | env:
44 | MODELS_FETCHED: true
45 |
46 | testPython311:
47 | needs: testPython310
48 | runs-on: macos-13
49 | steps:
50 | - uses: actions/checkout@v4
51 |
52 | - name: Set up Python 3.11
53 | uses: actions/setup-python@v5
54 | with:
55 | python-version: '3.11'
56 | cache: 'pip'
57 | cache-dependency-path: 'pyproject.toml'
58 |
59 | - name: Install Dependencies
60 | run: |
61 | python -m pip install --upgrade pip
62 | python -m pip install --upgrade setuptools
63 | python -m pip install wheel flask pytest
64 | python -m pip install -e ".[dev]"
65 |
66 | - name: Download Models
67 | id: DownloadModelsAttempt1
68 | run: python -c "import pysipfenn; c = pysipfenn.Calculator(); c.downloadModels(); c.loadModels();"
69 | continue-on-error: true
70 |
71 | - name: Download Models Retry if failed the first time
72 | if: failure()
73 | run: python -c "import time; time.sleep(120); import pysipfenn; c = pysipfenn.Calculator(autoLoad=False); c.downloadModels(); c.loadModels();"
74 |
75 | - name: Test with pytest
76 | run: pytest --durations=0
77 | env:
78 | MODELS_FETCHED: true
79 |
--------------------------------------------------------------------------------
/.github/workflows/publishPyPI.yaml:
--------------------------------------------------------------------------------
1 | name: Upload to PyPI
2 |
3 | on:
4 | push:
5 | tags:
6 | - '**'
7 | workflow_dispatch:
8 |
9 | jobs:
10 | deploy:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: actions/checkout@v4
14 |
15 | - name: Set up Python
16 | uses: actions/setup-python@v5
17 | with:
18 | python-version: '3.10'
19 | cache: 'pip'
20 | cache-dependency-path: 'pyproject.toml'
21 |
22 | - name: Install dependencies
23 | run: |
24 | python -m pip install --upgrade pip
25 | pip install build
26 |
27 | - name: Build package
28 | run: python -m build
29 |
30 | - name: Publish package
31 | uses: pypa/gh-action-pypi-publish@v1.8.10
32 | with:
33 | user: __token__
34 | password: ${{ secrets.PYPI_API_TOKEN }}
35 |
--------------------------------------------------------------------------------
/.github/workflows/weeklyTesting.yaml:
--------------------------------------------------------------------------------
1 | name: Weekly Test Action (periodic verification everything works)
2 |
3 | on:
4 | schedule:
5 | - cron: '30 17 * * 1'
6 | workflow_dispatch:
7 |
8 | jobs:
9 | coreTests:
10 | strategy:
11 | matrix:
12 | python-version: ["3.10", "3.11"]
13 | platform: [ubuntu-latest, macos-latest, windows-latest]
14 | fail-fast: false
15 | runs-on: ${{ matrix.platform }}
16 | steps:
17 | - uses: actions/checkout@v4
18 |
19 | - name: Set up Python ${{ matrix.python-version }}
20 | uses: actions/setup-python@v5
21 | with:
22 | python-version: ${{ matrix.python-version }}
23 | cache: 'pip'
24 | cache-dependency-path: 'pyproject.toml'
25 |
26 | - name: Install dependencies
27 | run: |
28 | python -m pip install --upgrade pip
29 | python -m pip install --upgrade setuptools
30 | python -m pip install wheel flask pytest
31 | python -m pip install -e .
32 | - name: Test with pytest
33 | run: |
34 | pytest --durations=0
35 |
36 | testFullPython310:
37 | needs: coreTests
38 | runs-on: macos-13
39 | steps:
40 | - uses: actions/checkout@v4
41 |
42 | - name: Set up Python 3.10
43 | uses: actions/setup-python@v5
44 | with:
45 | python-version: '3.10'
46 | cache: 'pip'
47 | cache-dependency-path: 'pyproject.toml'
48 |
49 | - name: Install Dependencies
50 | run: |
51 | python -m pip install --upgrade pip
52 | python -m pip install --upgrade setuptools
53 | python -m pip install wheel flask pytest
54 | python -m pip install -e ".[dev]"
55 |
56 | - name: Download Models
57 | id: DownloadModelsAttempt1
58 | run: python -c "import pysipfenn; c = pysipfenn.Calculator(); c.downloadModels(); c.loadModels();"
59 | continue-on-error: true
60 |
61 | - name: Download Models Retry if failed the first time
62 | if: failure()
63 | run: python -c "import time; time.sleep(120); import pysipfenn; c = pysipfenn.Calculator(autoLoad=False); c.downloadModels(); c.loadModels();"
64 |
65 | - name: Test with pytest
66 | run: pytest --durations=0
67 | env:
68 | MODELS_FETCHED: true
69 |
70 |
71 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Skip documentation builds
2 | docs/_build
3 | docs/jupyter_execute
4 |
5 | # Python compiled files and cache
6 | *.pyc
7 | **/__pycache__
8 | pysipfenn.egg-info
9 |
10 | # ONNX Models
11 | *.onnx
12 |
13 | # Test and temporary files
14 | **/*_TestResult.csv
15 | **/TestResult_*.csv
--------------------------------------------------------------------------------
/.readthedocs.yaml:
--------------------------------------------------------------------------------
1 | # .readthedocs.yaml
2 | # Read the Docs configuration file
3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4 | version: 2
5 |
6 | build:
7 | os: ubuntu-22.04
8 | tools:
9 | python: "3.9"
10 |
11 | # Build documentation in the docs/ directory with Sphinx
12 | sphinx:
13 | builder: html
14 | configuration: docs/conf.py
15 |
16 | python:
17 | install:
18 | - requirements: docs/docs_requirements.txt
19 | - method: pip
20 | path: .
--------------------------------------------------------------------------------
/CITATION.cff:
--------------------------------------------------------------------------------
1 | cff-version: 1.2.0
2 | message: "If you use this software, please cite our research article as:"
3 | authors:
4 | - family-names: "Krajewski"
5 | given-names: "Adam M."
6 | orcid: "https://orcid.org/0000-0002-2266-0099"
7 | - family-names: "Siegel"
8 | given-names: "Jonathan"
9 | orcid: "https://orcid.org/0000-0002-1493-4889"
10 | - family-names: "Jinhao"
11 | given-names: "Xu"
12 | - family-names: "Liu"
13 | given-names: "Zi-Kui"
14 | orcid: "https://orcid.org/0000-0003-3346-3696"
15 | title: "Extensible Structure-Informed Prediction of Formation Energy with improved accuracy and usability employing neural networks"
16 | doi: 10.1016/j.commatsci.2022.111254
17 | date-released: 2020-08-31
18 | url: "https://github.com/PhasesResearchLab/pySIPFENN"
19 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | # GNU LGPL v3.0
2 |
3 | Copyright (c) 2019-2023 Adam M. Krajewski and Jonathan Siegel
4 | through the Phases Research Lab (phaseslab.org) at the
5 | Pennsylvania State University (PSU)
6 |
7 | ## GNU LESSER GENERAL PUBLIC LICENSE
8 |
9 | Version 3, 29 June 2007
10 |
11 | Copyright (C) 2007 Free Software Foundation, Inc.
12 |
13 |
14 | Everyone is permitted to copy and distribute verbatim copies of this
15 | license document, but changing it is not allowed.
16 |
17 | This version of the GNU Lesser General Public License incorporates the
18 | terms and conditions of version 3 of the GNU General Public License,
19 | supplemented by the additional permissions listed below.
20 |
21 | ### 0. Additional Definitions.
22 |
23 | As used herein, "this License" refers to version 3 of the GNU Lesser
24 | General Public License, and the "GNU GPL" refers to version 3 of the
25 | GNU General Public License.
26 |
27 | "The Library" refers to a covered work governed by this License, other
28 | than an Application or a Combined Work as defined below.
29 |
30 | An "Application" is any work that makes use of an interface provided
31 | by the Library, but which is not otherwise based on the Library.
32 | Defining a subclass of a class defined by the Library is deemed a mode
33 | of using an interface provided by the Library.
34 |
35 | A "Combined Work" is a work produced by combining or linking an
36 | Application with the Library. The particular version of the Library
37 | with which the Combined Work was made is also called the "Linked
38 | Version".
39 |
40 | The "Minimal Corresponding Source" for a Combined Work means the
41 | Corresponding Source for the Combined Work, excluding any source code
42 | for portions of the Combined Work that, considered in isolation, are
43 | based on the Application, and not on the Linked Version.
44 |
45 | The "Corresponding Application Code" for a Combined Work means the
46 | object code and/or source code for the Application, including any data
47 | and utility programs needed for reproducing the Combined Work from the
48 | Application, but excluding the System Libraries of the Combined Work.
49 |
50 | ### 1. Exception to Section 3 of the GNU GPL.
51 |
52 | You may convey a covered work under sections 3 and 4 of this License
53 | without being bound by section 3 of the GNU GPL.
54 |
55 | ### 2. Conveying Modified Versions.
56 |
57 | If you modify a copy of the Library, and, in your modifications, a
58 | facility refers to a function or data to be supplied by an Application
59 | that uses the facility (other than as an argument passed when the
60 | facility is invoked), then you may convey a copy of the modified
61 | version:
62 |
63 | - a) under this License, provided that you make a good faith effort
64 | to ensure that, in the event an Application does not supply the
65 | function or data, the facility still operates, and performs
66 | whatever part of its purpose remains meaningful, or
67 | - b) under the GNU GPL, with none of the additional permissions of
68 | this License applicable to that copy.
69 |
70 | ### 3. Object Code Incorporating Material from Library Header Files.
71 |
72 | The object code form of an Application may incorporate material from a
73 | header file that is part of the Library. You may convey such object
74 | code under terms of your choice, provided that, if the incorporated
75 | material is not limited to numerical parameters, data structure
76 | layouts and accessors, or small macros, inline functions and templates
77 | (ten or fewer lines in length), you do both of the following:
78 |
79 | - a) Give prominent notice with each copy of the object code that
80 | the Library is used in it and that the Library and its use are
81 | covered by this License.
82 | - b) Accompany the object code with a copy of the GNU GPL and this
83 | license document.
84 |
85 | ### 4. Combined Works.
86 |
87 | You may convey a Combined Work under terms of your choice that, taken
88 | together, effectively do not restrict modification of the portions of
89 | the Library contained in the Combined Work and reverse engineering for
90 | debugging such modifications, if you also do each of the following:
91 |
92 | - a) Give prominent notice with each copy of the Combined Work that
93 | the Library is used in it and that the Library and its use are
94 | covered by this License.
95 | - b) Accompany the Combined Work with a copy of the GNU GPL and this
96 | license document.
97 | - c) For a Combined Work that displays copyright notices during
98 | execution, include the copyright notice for the Library among
99 | these notices, as well as a reference directing the user to the
100 | copies of the GNU GPL and this license document.
101 | - d) Do one of the following:
102 | - 0) Convey the Minimal Corresponding Source under the terms of
103 | this License, and the Corresponding Application Code in a form
104 | suitable for, and under terms that permit, the user to
105 | recombine or relink the Application with a modified version of
106 | the Linked Version to produce a modified Combined Work, in the
107 | manner specified by section 6 of the GNU GPL for conveying
108 | Corresponding Source.
109 | - 1) Use a suitable shared library mechanism for linking with
110 | the Library. A suitable mechanism is one that (a) uses at run
111 | time a copy of the Library already present on the user's
112 | computer system, and (b) will operate properly with a modified
113 | version of the Library that is interface-compatible with the
114 | Linked Version.
115 | - e) Provide Installation Information, but only if you would
116 | otherwise be required to provide such information under section 6
117 | of the GNU GPL, and only to the extent that such information is
118 | necessary to install and execute a modified version of the
119 | Combined Work produced by recombining or relinking the Application
120 | with a modified version of the Linked Version. (If you use option
121 | 4d0, the Installation Information must accompany the Minimal
122 | Corresponding Source and Corresponding Application Code. If you
123 | use option 4d1, you must provide the Installation Information in
124 | the manner specified by section 6 of the GNU GPL for conveying
125 | Corresponding Source.)
126 |
127 | ### 5. Combined Libraries.
128 |
129 | You may place library facilities that are a work based on the Library
130 | side by side in a single library together with other library
131 | facilities that are not Applications and are not covered by this
132 | License, and convey such a combined library under terms of your
133 | choice, if you do both of the following:
134 |
135 | - a) Accompany the combined library with a copy of the same work
136 | based on the Library, uncombined with any other library
137 | facilities, conveyed under the terms of this License.
138 | - b) Give prominent notice with the combined library that part of it
139 | is a work based on the Library, and explaining where to find the
140 | accompanying uncombined form of the same work.
141 |
142 | ### 6. Revised Versions of the GNU Lesser General Public License.
143 |
144 | The Free Software Foundation may publish revised and/or new versions
145 | of the GNU Lesser General Public License from time to time. Such new
146 | versions will be similar in spirit to the present version, but may
147 | differ in detail to address new problems or concerns.
148 |
149 | Each version is given a distinguishing version number. If the Library
150 | as you received it specifies that a certain numbered version of the
151 | GNU Lesser General Public License "or any later version" applies to
152 | it, you have the option of following the terms and conditions either
153 | of that published version or of any later version published by the
154 | Free Software Foundation. If the Library as you received it does not
155 | specify a version number of the GNU Lesser General Public License, you
156 | may choose any version of the GNU Lesser General Public License ever
157 | published by the Free Software Foundation.
158 |
159 | If the Library as you received it specifies that a proxy can decide
160 | whether future versions of the GNU Lesser General Public License shall
161 | apply, that proxy's public statement of acceptance of any version is
162 | permanent authorization for you to choose that version for the
163 | Library.
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | recursive-include pysipfenn/descriptorDefinitions *
2 |
3 | recursive-include pysipfenn/tests/testCaseFiles *
4 |
5 | include pysipfenn/modelsSIPFENN/models.json
6 | include pysipfenn/modelsSIPFENN/README.md
7 |
8 | prune example.workshop2023Feb
9 | prune docs
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line, and also
5 | # from the environment for the first two.
6 | SPHINXOPTS ?=
7 | SPHINXBUILD ?= sphinx-build
8 | SOURCEDIR = .
9 | BUILDDIR = _build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | # Catch-all target: route all unknown targets to Sphinx using the new
18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19 | %: Makefile
20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 |
--------------------------------------------------------------------------------
/docs/_static/KS2022.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/docs/_static/KS2022.png
--------------------------------------------------------------------------------
/docs/_static/KS2022_dilute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/docs/_static/KS2022_dilute.png
--------------------------------------------------------------------------------
/docs/_static/KS2022_randomSolution.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/docs/_static/KS2022_randomSolution.png
--------------------------------------------------------------------------------
/docs/_static/SIPFENN_logo_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/docs/_static/SIPFENN_logo_small.png
--------------------------------------------------------------------------------
/docs/_static/pySIPFENN_MainSchematic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/docs/_static/pySIPFENN_MainSchematic.png
--------------------------------------------------------------------------------
/docs/changelog.rst:
--------------------------------------------------------------------------------
1 | Changelog
2 | =========
3 |
4 | .. changelog::
5 | :changelog-url: https://pysipfenn.readthedocs.io/en/stable/#changelog
6 | :github: https://github.com/PhasesResearchLab/pySIPFENN/releases/
7 | :pypi: https://pypi.org/project/pysipfenn/
--------------------------------------------------------------------------------
/docs/conf.py:
--------------------------------------------------------------------------------
1 | # Configuration file for the Sphinx documentation builder.
2 | #
3 | # For the full list of built-in configuration values, see the documentation:
4 | # https://www.sphinx-doc.org/en/master/usage/configuration.html
5 |
6 | # -- Project information -----------------------------------------------------
7 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8 |
9 | from pysipfenn.core.pysipfenn import __version__, __file__
10 | import os
11 |
12 | project = 'pySIPFENN'
13 | copyright = '2019-24, Adam M. Krajewski'
14 | author = 'Adam M. Krajewski'
15 | version = __version__
16 | release = __version__
17 | language = 'en'
18 |
19 | # -- General configuration ---------------------------------------------------
20 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
21 |
22 | extensions = ['sphinx.ext.linkcode',
23 | 'sphinx.ext.duration',
24 | 'sphinx.ext.coverage',
25 | 'sphinx.ext.napoleon',
26 | 'sphinx.ext.autodoc',
27 | 'sphinx_autodoc_typehints',
28 | 'myst_nb',
29 | 'sphinx_github_changelog',
30 | 'sphinx_rtd_size'
31 | ]
32 |
33 | # Jupyter Notebook configuration
34 | nb_execution_mode = "off"
35 | nb_execution_cache_path = "../temp/jupyter_cache"
36 |
37 | # Changelog configuration
38 | sphinx_github_changelog_token = password = os.environ.get("sphinx_github_changelog_token")
39 |
40 | # -- Options for autodoc -----------------------------------------------------
41 |
42 | add_module_names = False
43 | templates_path = ['_templates']
44 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '../**/tests*']
45 |
46 | # -- Options for napoleon ----------------------------------------------------
47 | napoleon_use_param = True
48 |
49 |
50 | # -- Options for HTML output -------------------------------------------------
51 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
52 |
53 | html_theme = "sphinx_rtd_theme"
54 | html_static_path = ['_static']
55 | sphinx_rtd_size_width = "70%"
56 |
57 |
58 | html_context = {
59 | "display_github": True,
60 | "github_user": "PhasesResearchLab",
61 | "github_repo": "pySIPFENN",
62 | "github_version": "main",
63 | "conf_py_path": "/docs/",
64 | }
65 |
66 | def linkcode_resolve_simple(domain, info):
67 | if domain != 'py':
68 | return None
69 | if not info['module']:
70 | return None
71 | filename = info['module'].replace('.', '/')
72 | return "https://github.com/PhasesResearchLab/pySIPFENN/tree/main/%s.py" % filename
73 |
74 | # Resolve function for the linkcode extension.
75 | # Thanks to https://github.com/Lasagne/Lasagne/blob/master/docs/conf.py
76 | def linkcode_resolve(domain, info):
77 | def find_source():
78 | import inspect
79 | import os, sys
80 | obj = sys.modules[info["module"]]
81 | for part in info["fullname"].split("."):
82 | obj = getattr(obj, part)
83 |
84 | fn = inspect.getsourcefile(obj)
85 | fn = os.path.relpath(fn, start=os.path.dirname(__file__))
86 | source, lineno = inspect.getsourcelines(obj)
87 | return fn, lineno, lineno + len(source) - 1
88 |
89 | if domain != "py" or not info["module"]:
90 | return None
91 |
92 | try:
93 | rel_path, line_start, line_end = find_source()
94 | # __file__ is imported from pysipfenn.core.pysipfenn
95 | filename = f"pysipfenn/core/{rel_path}#L{line_start}-L{line_end}"
96 | except Exception:
97 | # no need to be relative to core here as module includes full path.
98 | filename = info["module"].replace(".", "/") + ".py"
99 |
100 | tag = "v" + __version__
101 | return f"https://github.com/PhasesResearchLab/pySIPFENN/blob/{tag}/{filename}"
102 |
--------------------------------------------------------------------------------
/docs/contributing.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | ## What to Contribute
4 |
5 | If you wish to contribute to the development of pySIPFENN you are more than welcome to do so by forking the repository and creating a pull request. As of Spring
6 | 2024, we are actively developing the code and we should get back to you within a few days. We are also open to collaborations and partnerships, so if you have
7 | an idea for a new feature or a new model, please do not hesitate to contact us through the GitHub issues or by `email `__.
8 |
9 | In particular, we are seeking contributions in the following areas:
10 |
11 | - **New Models**: We are always looking for new models to add to the repository. We have several (yet) unpublished ones for several different properties, so there is a good chance it will work for your case as well. We are happy to provide basic support for training, including using the default model for **transfer learning on small datasets**.
12 |
13 | - **New Featurizers / Descriptor Sets**: We are always looking for new ways to featurize atomic configurations.
14 | - We are **particularly interested** in including more domain-specific knowledge for different niches of materials science. Our KS2022 does a good job for most materials, but we look to expand it.
15 | - We are **not looking for** featurizers that (a) cannot embed a structure into the feature space (e.g., most of the graph representations, which became popular in the last two years) or (b) do not encode physics into the feature space (e.g., raw atomic coordinates or 3D voxel representations).
16 | - Note: Autoencoders which utilize graph or 3D voxel representations to encode latent space position to predict property/properties fall into the first category and **are very welcome**.
17 |
18 | - **Quality of Life Improvements**: We are always looking for ways to make the software easier to use and more efficient for users. If you have an idea for a new data parsing method, or a new way to visualize the results, we would love to hear about it.
19 |
20 | ## Rules for Contributing
21 |
22 | We are currently very flexible with the rules for contributing, despite being quite opinionated :)
23 |
24 | Some general guidelines are:
25 | - The ``core`` module is the only one that should be used by our typical end user. All **top-level APIs should be defined in the ``pysipfenn.py``** through the ``Calculator`` class. APIs operating _on_ the ``Calculator`` class, to export or retrain models, should be defined outside it, but within ``pysipfenn.core`` module.
26 |
27 | - All **featurizers / descriptor calculators _must_ be self-contained in a single submodule** (file or directory) of ``pysipfenn.descriptorDefinitions`` (i.e., not spread around the codebase) and depend only on standard Python library and current pySIPFENN dependencies, including ``numpy``, ``torch``, ``pymatgen``, ``onnx``, ``tqdm``. If you need to add a new dependency, please discuss it with us first.
28 |
29 | - All models **_must_ be ONNX models**, which can be obtained from almost any machine learning framework. We are happy to help with this process.
30 |
31 | - All new classes, attributes, and methods **_must_ be type-annotated**. We are happy to help with this process.
32 |
33 | - All new classes, attributes, and methods **_must_ have a well-styled docstring**. We are happy to help with this process.
34 |
35 | - All functions, classes, and methods **_should_ have explicit inputs**, rather than passing a dictionary of parameters (*kwargs). This does require a bit more typing, but it makes the code much easier to use for the end user, who can see in the IDE exactly what parameters are available and what they do.
36 |
37 | - All functions, classes, and methods **_should_ explain _why_ they are doing something, not just _what_** they are doing. This is critical for end-users who did not write the code and are trying to understand it. In particular, the default values of parameters should be explained in the docstring.
38 |
39 | - All new features _must_ be tested with the ``pytest`` framework. **Coverage _should_ be 100%** for new code or close to it for good reasons. We are happy to help with this process.
--------------------------------------------------------------------------------
/docs/docs_requirements.txt:
--------------------------------------------------------------------------------
1 | sphinx-github-changelog>=1.2.1
2 | sphinx-autodoc-typehints
3 | sphinx-rtd-size
4 | sphinx-rtd-theme>=1.3.0
5 | myst-nb>=0.17.2
6 | sphinx>5.0.0
7 | pytest
--------------------------------------------------------------------------------
/docs/examples/assets/112-Cr12Fe10Ni8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/docs/examples/assets/112-Cr12Fe10Ni8.png
--------------------------------------------------------------------------------
/docs/examples/assets/SigmaSQS_plots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/docs/examples/assets/SigmaSQS_plots.png
--------------------------------------------------------------------------------
/docs/examples/assets/neuralnetcolorized.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/docs/examples/assets/neuralnetcolorized.png
--------------------------------------------------------------------------------
/docs/exportingmodels.md:
--------------------------------------------------------------------------------
1 | # Exporting pySIPFENN Models
2 |
3 | ## General Information
4 |
5 | Whether you are the end-user of ML models and you want to integrate them into some other software that requires a
6 | specific format, or you are a developer who is modifying pySIPFENN models to predict formation energy resulting from
7 | some particular DFT settings/pseudopotentials, or you retrain them on entirely different properties, you will probably need to export
8 | the models at some point. This page provides information on how to do that using the 3 exporter classes we provide
9 | in the `pysipfenn/core/modelExporters.py` module. Their API is very high-level and simple to use, so the process
10 | should be straightforward.
11 |
12 | Please be aware that to use these exporters, you will need to install additional dependencies by installing the `dev`
13 | extras with
14 |
15 | pip install "pysipfenn[dev]"
16 |
17 | or for development installation
18 |
19 | pip install ".[dev]"
20 |
21 |
22 | ## ONNXExporter
23 |
24 | The `ONNXExporter` class is used to export pySIPFENN models to the [ONNX](https://onnx.ai/) format. This is also the
25 | same format they are shipped in by us! The reason we implemented this exporter is that:
26 | 1. Within pySIPFENN, models are actually stored as PyTorch models, and if they are modified, they need to be converted to
27 | ONNX format again.
28 | 2. This exporter allows you to export models in different precision (float16) using its `toFP16` method. This is useful
29 | if you want to use the models on devices with limited memory, such as mobile phones or embedded devices.
30 | 3. This exporter also allows you to simplify the model through the recent ONNX Optimizer package implementation, which
31 | could improve model performance and reduce its size.
32 |
33 | To get started, you should take an initialized Calculator object and pass it to the exporter.
34 |
35 | from pysipfenn import ONNXExporter
36 | from pysipfenn import Calculator
37 |
38 | c = Calculator()
39 | onnx_exporter = ONNXExporter(c)
40 |
41 | and then simply
42 |
43 | onnx_exporter.export("MyModelNameGoesHere")
44 |
45 | or to export all models in `c` at once
46 |
47 | onnx_exporter.exportAll()
48 |
49 | and you should see new files like `MyModelNameGoesHere.onnx` in the current working directory.
50 |
51 | If you want to export the
52 | model in float16 precision, before you call `export` method, you should call
53 |
54 | onnx_exporter.toFP16("MyModelNameGoesHere")
55 |
56 | or to convert all models in `c` at once
57 |
58 | onnx_exporter.toFP16All()
59 |
60 | and similarly for simplification
61 |
62 | onnx_exporter.simplify("MyModelNameGoesHere")
63 |
64 | or
65 |
66 | onnx_exporter.simplifyAll()
67 |
68 | To summarize, if you want to export all models in `c` in float16 precision and simplified, you can do it with
69 |
70 | from pysipfenn import ONNXExporter
71 | from pysipfenn import Calculator
72 |
73 | c = Calculator()
74 | onnx_exporter = ONNXExporter(c)
75 | onnx_exporter.simplifyAll()
76 | onnx_exporter.toFP16All()
77 | onnx_exporter.exportAll()
78 |
79 | and you should see new files like `MyModelNameGoesHere_simplified_fp16.onnx` in the current working directory.
80 |
81 |
82 | ## PyTorch
83 |
84 | This is the simplest of the export methods because, as mentioned in [ONNXExporter](#ONNXExporter) section, pySIPFENN
85 | models are already stored as PyTorch models; therefore, no conversion is needed. You can use it by simply calling
86 |
87 | from pysipfenn import PyTorchExporter
88 | from pysipfenn import Calculator
89 |
90 | c = Calculator()
91 | torch_exporter = PyTorchExporter(c)
92 | torch_exporter.export("MyModelNameGoesHere")
93 |
94 | or to export all models in `c` at once, replace the last line with
95 |
96 | torch_exporter.exportAll()
97 |
98 | and you should see new files like `MyModelNameGoesHere.pt` in the current working directory.
99 |
100 |
101 | ## CoreML
102 |
103 | CoreML is a format developed by Apple for use in their devices, where it provides the most seamless integration with
104 | existing apps and can harvest very efficient Neural Engine hardware acceleration. At the same time, it can be used on
105 | other platforms as well, such as Linux or Windows, through [coremltools](https://coremltools.readme.io/docs) toolset
106 | from Apple used by this exporter.
107 |
108 | Note that under the hood, CoreML uses the float16 precision, so the model predictions will numerically match those
109 | exported with [ONNXExporter](#ONNXExporter) in float16 precision rather than the default pySIPFENN models. This can
110 | be useful if you want to use the models on devices with limited memory, such as mobile phones or embedded devices, and
111 | generally should not significantly affect the accuracy of the predictions.
112 |
113 | You can use it by simply calling
114 |
115 | from pysipfenn import CoreMLExporter
116 | from pysipfenn import Calculator
117 |
118 | c = Calculator()
119 | coreml_exporter = CoreMLExporter(c)
120 | coreml_exporter.export("MyModelNameGoesHere")
121 |
122 | or to export all models in `c` at once, replace the last line with
123 |
124 | coreml_exporter.exportAll()
125 |
126 | and you should see new files like `MyModelNameGoesHere.mlpackage` in the current working directory. If you are on MacOS and
127 | have XCode installed, you can double-click on it to evaluate its integrity and benchmark its performance.
128 |
129 |
--------------------------------------------------------------------------------
/docs/faq.md:
--------------------------------------------------------------------------------
1 | # FAQ
2 |
3 | This page is not meant to be an extensive documentation of how to address all questions
4 | that may arrise when using pySIPFENN as a result of things outside our control, such as
5 | interpreter configuration, permissions, operating system issues. These can often be
6 | resolved by searching the internet for the error message you are receiving.
7 |
8 | ## First things to check
9 |
10 | In case you are having issues, it is good to first check the following few things that
11 | helped other users.
12 |
13 | ### How to see if it works?
14 |
15 | The easiest way to see if pySIPFENN is installed correctly is to run the following command:
16 |
17 | python -c "import pysipfenn; print(pysipfenn.__version__)"
18 |
19 | Then, to see if its core functionalities are working, you can run a small profiling script that will featurize
20 | (calculate KS2022 feature vector of) a typical atomic structure we use to profile its speed:
21 |
22 | python -c "from pysipfenn.descriptorDefinitions import KS2022; KS2022.profile()"
23 |
24 | You can also profile in parallel to see if your system is configured correctly for parallelization:
25 |
26 | python -c "from pysipfenn.descriptorDefinitions import KS2022; KS2022.profileParallel()"
27 |
28 | If you got to this point, it means that pySIPFENN is almost certainly working correctly, because most complex operations
29 | that could go wrong didn't. If something did go wrong, look through this FAQ and the [installation instructions](install.md)
30 | to see if you can find a solution. If you still can't, please [open an issue](https://github.com/PhasesResearchLab/pySIPFENN/issues)
31 | or email [ak@psu.edu](mailto:ak@psu.edu) and we will be happy to help you.
32 |
33 | Now, you can try to run the tutorial notebook to see if you are able to run SIPFENN models
34 | and make predictions by opening the `example.workshop2023Feb/sipfenn_examples_clean.ipynb` notebook in Jupyter Notebook
35 | or Jupyter Lab and following the instructions. To see how this notebook should look like after successful execution,
36 | you can look at the `example.workshop2023Feb/sipfenn_examples.ipynb` or [this page in the pySIPFENN documentation](
37 | https://pysipfenn.readthedocs.io/en/stable/examples/sipfenn_examples.html#pysipfenn-mgf-psu-workshop-feb-2023).
38 |
39 |
40 | ### System and Architecture
41 |
42 | pySIPFENN should generally run well on any operating system and computer architecture. In addition to automated CI
43 | testing through GitHub Actions across platforms and Python version every time code is modified (see
44 | [pySIPFENN Repository Actions](https://github.com/PhasesResearchLab/pySIPFENN/actions)), we and our collaborators test it on 6 common
45 | combinations, which are listed below:
46 | - Windows 10/11 64-bit on x86_64 (i.e. Intel/AMD)
47 | - Windows 11 on ARM64 (e.g. Surface Pro X, Parallels VM on M1/M2 Macs)
48 | - Linux on x86_64 (i.e. Intel/AMD)
49 | - Linux on ARM64 (e.g. Raspberry Pi 4, Jetson Nano, etc.)
50 | - MacOS on x86_64 (most Macs from before 2021)
51 | - MacOS on ARM64 (Macs with M1/M2 chip)
52 |
53 | Thus, it is unlikely that your operating system (PC vs Mac) or architecture (Intel
54 | vs M1/M2 Mac) is the issue. However, if you are using a different platform than above, please
55 | let us know, and we will try to help you.
56 |
57 | ### Python Version
58 | Make sure you are using the correct version of Python. pySIPFENN _requires_ Python 3.9 or
59 | higher. We recommend 3.10 for longer support. The 3.11 is officially supported starting from
60 | pySIPFENN v0.12.0 (April 2023).
61 |
62 | If you are using a different version, you can either install a new version of
63 | Python or use a virtual environment to install pySIPFENN in. We recommend using
64 | Conda to create a virtual environment. See the [installation instructions](install.md)
65 | making sure to specify the version of Python.
66 |
67 | ### Up-to-date Conda / pip
68 |
69 | Some users had problems with (1) loading the models or (2) making predictions using them
70 | and we traced the issue to an outdated version of Conda installed on their work station
71 | by their IT department. Updating Conda, pip, setuptools, and reinstalling pySIPFENN fixed the issue.
72 | You can try:
73 |
74 | conda update -n base conda -c anaconda
75 | conda update pip
76 | pip install --upgrade setuptools
77 | pip install --upgrade --force-reinstall pysipfenn
78 |
79 | If you downloaded the models before, they should be retained as long as you do not
80 | change the Conda environment. If you do, you will have to download them again.
81 |
82 | ### Model Download
83 |
84 | All default `pySIPFENN` models are hosted in our Zenodo repository (linked in the
85 | main page of this documentation and GitHub README). They are ready to be downloaded
86 | automatically by `pySIPFENN` by simply rinning the `downloadModels()` function over
87 | any `Calculator` instance and will be permanently stored in the `pySIPFENN` installation
88 | directory (inside the `models` folder). Printing the `Calculator` instance will show
89 | you the exact path where the models are stored if you want to check it.
90 |
91 | If you have issues downloading the model files in reasonable time, this is usually
92 | correlated with a workshop, after which many users try to download them from Zenodo
93 | concurrently and exhaust the bandwidth. If that is the case, please try to download
94 | the models in a few hours or the next day; otherwise, please let us know, and we will
95 | try to help you by providing the files directly.
96 |
97 | We also received a report that some **MacOS** installations of `python` itself can lack
98 | `SSL` certificate support out-of-the-box and it needs to be enabled manually to enable
99 | downloading `pySIPFENN` models from Zenodo, with the following one-line command (after
100 | replacing `Python 3.9` with your Python version):
101 |
102 | open /Applications/Python\ 3.9/Install\ Certificates.command
103 |
104 | ## Known problems with easy solutions
105 |
106 | ### Torch and ONNX Issues
107 |
108 | - Some users recently reported getting `ImportError: cannot import name 'COMMON_SAFE_ASCII_CHARACTERS' from 'charset_normalizer.constant'` error when using both recent (mid-2023) `torch` and `Mac OS on M1/M2 Macs`. It seems to be some dependency issue between `onnx2torch` and `torchvision`, but it can be quickly solved with installing missing `chardet` package with pip as
109 |
110 | pip install chardet
111 |
112 | ## More Complex Issues
113 |
114 | ### Out-Of-Memory Error / Models Cannot Load
115 |
116 | **RAM requirements to run:**
117 |
118 | While pySIPFENN shouldn't have much trouble running on most modern desktop and protable
119 | computers, it may have issues on older machines or on machines with limited RAM such as
120 | VMs on cloud instances. In general, to run the models, you will need:
121 | - 512MB of RAM for Light Model (NN24)
122 | - 2.5GB of RAM for KS2022 Novel Materials Model (NN30)
123 | - **6GB of RAM to run all default models** (NN9, NN20, NN24, NN30) and follow the workshop tutorial
124 |
125 | **RAM requirements to load:**
126 |
127 | Now, one needs to consider how much memory is needed to get the models loaded into the
128 | memory. This is a bit complicated, but in general, your system will need to use around twice the memory
129 | given above.
130 |
131 | At the same time, if you are using any modern version of Windows or MacOS, you shouldn't have any issues with this
132 | limits if your system has at least 8GB of RAM (assuming no memory-intensive applications
133 | running in the background) because they will utilize _pagefile_ (Windows) or _swap_ (MacOS) to automatically
134 | store the temporary data (as much as needed) that does not fit into RAM.
135 |
136 | **Memory on Linux**
137 |
138 | However, if you are using Linux, the _swap_ is not dynamic and if it's smaller than the
139 | amount of memory you need, you will get an error or the process will just be 'killed' by the system. You can check
140 | its size with
141 |
142 | free -h
143 |
144 | And if the sum of RAM and swap is less than 12GB, you likely won't be able to use all of
145 | pySIPFENN models. Fortunately, it's an easy fix for your administrator, or if you have sudo
146 | access, yourself. To **temporarily increase swap** you just need to allocate some space on
147 | your drive (e.g. 8GB)
148 |
149 | sudo fallocate -l 8G /swapfile
150 |
151 | limit access permissions for security reasons
152 |
153 | sudo chmod 600 /swapfile
154 |
155 | tell Linux that it is a swap file
156 |
157 | sudo mkswap /swapfile
158 |
159 | and enable it
160 |
161 | sudo swapon /swapfile
162 |
163 | Now, you should have no memory issues with running all pySIPFENN networks as of the time
164 | of writing (NN9, NN20, NN24, NN30). Please note that, as mentioned, this swap change is
165 | temporary and will disappear when ou reboot. To make it permanent, you can follow one of
166 | many guides available online.
167 |
168 | ### Errors related to initializing OpenMP library
169 |
170 | This error was reported to us by pySIPFENN user running Windows 11 64bit, but it wasn't seen by our team at any point
171 | on any of our 12 test systems and doesn't seem to be related to pySIPFENN directly, but to some conflict between
172 | scikit-learn and numpy, possibly because of problems with base conda installation. If you see it, we would recommend you
173 | re-install conda and recreate environments to avoid unexpected behavior of pySIPFENN and other Python tools you are using.
174 | However, if you are in a hurry and want to try this _not recommended_ fix, you can try to run the following commands before
175 | importing pySIPFENN:
176 |
177 | import os
178 | os.environ['KMP_DUPLICATE_LIB_OK']='True'
179 |
180 | Which fixed the issue for the user who reported it. If you also run into this issue, we would appreciate if you could
181 | let us know and we will investigate it further.
--------------------------------------------------------------------------------
/docs/index.rst:
--------------------------------------------------------------------------------
1 | .. image:: _static/SIPFENN_logo_small.png
2 | :width: 250pt
3 | :alt: logo
4 | :align: center
5 |
6 | =========
7 | pySIPFENN
8 | =========
9 |
10 | |GitHub top language| |PyPI - Python Version| |GitHub license| |PyPI Version| |PyPI Downloads|
11 |
12 | |GitHub last commit| |GitHub last release| |GitHub issues| |GitHub commits since previous| |GitHub commits since last|
13 |
14 | |Full| |Linux| |MacM1| |Windows| |Coverage Status|
15 |
16 | **2022 Paper:** |Paper DOI| |Paper Arxiv|
17 |
18 | **2024 Paper:** |Paper2 DOI| |Paper2 Arxiv|
19 |
20 | **ML Models:** |Zenodo DOI|
21 |
22 | .. |GitHub top language| image:: https://img.shields.io/github/languages/top/PhasesResearchLab/pysipfenn
23 | :alt: GitHub top language
24 | :target: https://github.com/PhasesResearchLab/pySIPFENN
25 |
26 | .. |PyPI - Python Version| image:: https://img.shields.io/pypi/pyversions/pysipfenn
27 | :alt: PyPI - Python Version
28 | :target: https://www.python.org/downloads/release/python-3100/
29 |
30 | .. |PyPI Version| image:: https://img.shields.io/pypi/v/pysipfenn?label=PyPI&color=green
31 | :target: https://pypi.org/project/pysipfenn/
32 | :alt: PyPI
33 |
34 | .. |PyPI Downloads| image:: https://img.shields.io/pypi/dm/pysipfenn
35 | :target: https://pypi.org/project/pysipfenn/
36 | :alt: PyPI
37 |
38 | .. |Full| image:: https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/fullTest.yaml/badge.svg
39 | :alt: Build Status
40 | :target: https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/fullTest.yaml
41 |
42 | .. |Linux| image:: https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_LinuxUbuntu.yaml/badge.svg
43 | :alt: Linux Status
44 | :target: https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_LinuxUbuntu.yaml
45 |
46 | .. |MacM1| image:: https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_MacM1.yaml/badge.svg
47 | :alt: Mac M1 Status
48 | :target: https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_MacM1.yaml
49 |
50 | .. |Windows| image:: https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_Windows.yaml/badge.svg
51 | :alt: Windows Status
52 | :target: https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_Windows.yaml
53 |
54 | .. |Coverage Status| image:: https://codecov.io/gh/PhasesResearchLab/pySIPFENN/branch/main/graph/badge.svg?token=S2J0KR0WKQ
55 | :alt: Coverage Status
56 | :target: https://codecov.io/gh/PhasesResearchLab/pySIPFENN
57 |
58 | .. |GitHub license| image:: https://img.shields.io/badge/License-LGPL_v3-blue.svg
59 | :alt: GitHub license
60 | :target: https://www.gnu.org/licenses/lgpl-3.0
61 |
62 | .. |GitHub last commit| image:: https://img.shields.io/github/last-commit/PhasesResearchLab/pySIPFENN?label=Last%20Commit
63 | :alt: GitHub last commit (by committer)
64 | :target: https://github.com/PhasesResearchLab/pySIPFENN/commits/main
65 |
66 | .. |GitHub last release| image:: https://img.shields.io/github/release-date/PhasesResearchLab/pysipfenn?label=Last%20Release
67 | :alt: GitHub Release Date - Published_At
68 | :target: https://github.com/PhasesResearchLab/pySIPFENN/releases
69 |
70 | .. |GitHub commits since previous| image:: https://img.shields.io/github/commits-since/PhasesResearchLab/pysipfenn/v0.13.0?color=g
71 | :alt: GitHub commits since previous
72 | :target: https://github.com/PhasesResearchLab/pySIPFENN/releases
73 |
74 | .. |GitHub commits since last| image:: https://img.shields.io/github/commits-since/PhasesResearchLab/pysipfenn/v0.15.0?color=g
75 | :alt: GitHub commits since last
76 | :target: https://github.com/PhasesResearchLab/pySIPFENN/releases
77 |
78 | .. |GitHub issues| image:: https://img.shields.io/github/issues/PhasesResearchLab/pySIPFENN
79 | :alt: GitHub issues
80 | :target: https://github.com/PhasesResearchLab/pySIPFENN/issues
81 |
82 | .. |Paper DOI| image:: https://img.shields.io/badge/DOI-10.1016%2Fj.commatsci.2022.111254-blue
83 | :target: https://doi.org/10.1016/j.commatsci.2022.111254
84 | :alt: 2022 Paper DOI
85 |
86 | .. |Paper Arxiv| image:: https://img.shields.io/badge/arXiv-2008.13654-8F1515?style=flat&logo=arxiv&logoColor=red
87 | :target: https://doi.org/10.48550/arXiv.2008.13654
88 | :alt: 2022 Paper ArXiv
89 |
90 | .. |Zenodo DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7373089.svg?
91 | :target: https://doi.org/10.5281/zenodo.7373089
92 | :alt: Zenodo DOI
93 |
94 | .. |Paper2 DOI| image:: https://img.shields.io/badge/DOI-10.1016%2Fj.commatsci.2024.113495-blue
95 | :target: https://doi.org/10.1016/j.commatsci.2024.113495
96 | :alt: 2024 Paper DOI
97 |
98 | .. |Paper2 Arxiv| image:: https://img.shields.io/badge/arXiv-2404.02849-8F1515?style=flat&logo=arxiv&logoColor=red
99 | :target: https://doi.org/10.48550/arXiv.2404.02849
100 | :alt: 2024 Paper ArXiv
101 |
102 | ``pySIPFENN`` or **py** thon toolset for **S** tructure- **I** nformed **P** roperty and **F** eature **E** ngineering with **N** eural **N** etworks implements a numer of researcher-friendly tools for:
103 |
104 | - **Calculating different vector representations of atomic structures** for a number of applications including supervised (e.g., predictive machine learning models) and unsupervised learning (e.g., clustering of atomic structures based on similarity or performing anomaly detection). Notably, utilize crystallographic information and some other techniques to make this process very efficient for the vast majority of use cases (see `arXiv:2404.02849 `_).
105 |
106 | - **Efficient deployment of pre-trained ML models** (not limited to neural networks) obtained from repositories like Zenodo (including `some we trained `_) or trained locally on user's machine. The system is very plug-and-play thanks to using Open Neural Network Exchange (ONNX) format which can be exported from nearly any machine learning framework.
107 |
108 | - **Tuning pre-trained ML models to new domains**, like new chemical compositions, different ab initio functional, or entirely new properties. Since V0.16, users can take advantage of integration with `OPTIMADE API `_ which allows one to tune models based on DFT datasets like Materials Project, OQMD, AFLOW, or NIST-JARVIS, in **just 3 lines of code** specifying which provider to use, what to query for, and hyperparameters for tuning.
109 |
110 | The underlying methodology, efficiency optimizations, design choices, and implementation specifics are given in the following publications:
111 |
112 | - Adam M. Krajewski, Jonathan W. Siegel, Zi-Kui Liu, `Efficient Structure-Informed Featurization and Property Prediction of Ordered, Dilute, and Random Atomic Structures`, April 2024, `arXiv:2404.02849 `_
113 |
114 | - Adam M. Krajewski, Jonathan W. Siegel, Jinchao Xu, Zi-Kui Liu, `Extensible Structure-Informed Prediction of Formation Energy with improved accuracy and usability employing neural networks`, Computational Materials Science, Volume 208, 2022, 111254, DOI: `10.1016/j.commatsci.2022.111254 `_
115 |
116 | The source code and developement discussions are available in the GitHub repository at `(git.pysipfenn.org) `_.
117 | You may also consider visiting our Phases Research Lab website at `(phaseslab.org) `_.
118 |
119 | News
120 | ----
121 |
122 | - **(v0.16.0)** Three exciting news! (1) The all new ```ModelAdjusters`` submodule automates tuning and can fetch
123 | data directly from ``OPTIMADE API`` (https://www.optimade.org); (2) A new manuscript detailing advantages of our
124 | featurization tools has been put on `arXiv:2404.02849 `_; and (3) the name of
125 | the software was updated to
126 | `python toolset for Structure-Informed Property and Feature Engineering with Neural Networks`` to retain the
127 | ``pySIPFENN`` acronym but better reflect our strengths and development direction.
128 |
129 | - **(v0.15.0)** A new descriptor (feature vector) calculator ``descriptorDefinitions.KS2022_randomSolutions`` has been implemented. It is used
130 | for structure informed featurization of compositions randomly occupying a lattice, spiritually similar to SQS generation, but also taking into
131 | account (1) chemical differences between elements and (2) structural effects. A full description will be given in the upcoming manuscript.
132 |
133 | - **(v0.14.0)** Users can now take advantage of a **Prototype Library** to obtain common structures from any ``Calculator`` instance ``c`` with a
134 | simple ``c.prototypeLibrary['BCC']['structure']``. It can be easily
135 | `updated `__
136 | or `appended `__ with high-level
137 | API or by manually modifyig its YAML `here `__.
138 |
139 | - **(v0.13.0)** Model exports (and more!) to PyTorch, CoreML, and ONNX are now effortless thanks to
140 | ``core.modelExporters`` module. Please note you need to install pySIPFENN with ``dev`` option (e.g., ``pip install "pysipfenn[dev]"``) to use it.
141 | See `docs here `__.
142 |
143 | - **(v0.12.2)** Swith to LGPLv3 allowing for integration with proprietary software developed by CALPHAD community, while supporting the development
144 | of new pySIPFENN features for all. Many thanks to our colleagues from `GTT-Technologies `__
145 | and other participants of `CALPHAD 2023 `__` for fruitful discussions.
146 |
147 | - **(March 2023 Workshop)** We would like to thank all of our amazing attendees for making our workshop, co-organized with the
148 | `Materials Genome Foundation `__, such a success! Over 100 of you simultaneously followed
149 | all exercises and, at the peak, we loaded over 1,200GB of models into the HPC's RAM.
150 |
151 |
152 | Main Schematic
153 | --------------
154 |
155 | The figure below is the main schematic of ``pySIPFENN`` framework detailing the interplay of internal components. The user interface provides
156 | a high-level API to process structural data within ``core.Calculator``, pass it to featurization submodules in ``descriptorDefinitions`` to
157 | obtain vector representation, then passed to models defined in ``models.json`` and (typically) run automatically through all available models.
158 | All internal data of ``core.Calculator`` is accessible directly, enabling rapid customization. An auxiliary high-level API enables advanced
159 | users to operate and retrain the models.
160 |
161 | .. image:: _static/pySIPFENN_MainSchematic.png
162 | :width: 800pt
163 | :alt: mainSchematic
164 | :align: center
165 |
166 |
167 | Index
168 | -----
169 |
170 | .. toctree::
171 | install
172 | source/pysipfenn
173 | exportingmodels
174 | faq
175 | miscellaneousnotes
176 | examples/sipfenn_examples
177 | 2022 Article
178 | 2024 Article
179 | changelog
180 | contributing
181 | genindex
182 | :maxdepth: 2
183 | :caption: Contents
184 |
185 | Applications
186 | ------------
187 |
188 | pySIPFENN is a very flexible tool that can, in principle, be used for
189 | the prediction of any property of interest that depends on an atomic
190 | configuration with very few modifications. The models shipped by
191 | default are trained to predict formation energy because that is what our
192 | research group is interested in; however, if one wanted to predict
193 | Poisson’s ratio and trained a model based on the same features, adding
194 | it would take minutes. Simply add the model in open ONNX format and link
195 | it using the *models.json* file, as described in the documentation.
196 |
197 | Real-World Examples
198 | -------------------
199 |
200 | In our line of work, pySIPFENN and the formation energies it predicts are
201 | usually used as a computational engine that generates proto-data for
202 | creation of thermodynamic databases (TDBs) using ESPEI
203 | (https://espei.org). The TDBs are then used through pycalphad
204 | (https://pycalphad.org) to predict phase diagrams and other
205 | thermodynamic properties.
206 |
207 | Another of its uses in our research is guiding the Density of Functional
208 | Theory (DFT) calculations as a low-cost screening tool. Their efficient
209 | conjunction then drives experiments leading to the discovery of new
210 | materials, as presented in these two papers:
211 |
212 | - Sanghyeok Im, Shun-Li Shang, Nathan D. Smith, Adam M. Krajewski,
213 | Timothy Lichtenstein, Hui Sun, Brandon J. Bocklund, Zi-Kui Liu,
214 | Hojong Kim, Thermodynamic properties of the Nd-Bi system via emf
215 | measurements, DFT calculations, machine learning, and CALPHAD
216 | modeling, Acta Materialia, Volume 223, 2022, 117448,
217 | https://doi.org/10.1016/j.actamat.2021.117448.
218 |
219 | - Shun-Li Shang, Hui Sun, Bo Pan, Yi Wang, Adam M. Krajewski, Mihaela
220 | Banu, Jingjing Li & Zi-Kui Liu, Forming mechanism of equilibrium and
221 | non-equilibrium metallurgical phases in dissimilar aluminum/steel
222 | (Al-Fe) joints. Nature Scientific Reports 11, 24251 (2021).
223 | https://doi.org/10.1038/s41598-021-03578-0
224 |
--------------------------------------------------------------------------------
/docs/install.md:
--------------------------------------------------------------------------------
1 | # Install pySIPFENN
2 |
3 | Installing pySIPFENN is simple and easy by utilizing **PyPI** package repository, **conda-forge** package repository, or by cloning from **GitHub** directly.
4 | While not required, it is recommended to first set up a virtual environment using venv or Conda. This ensures that (a) one of the required
5 | versions of Python (3.9+) is used and (b) there are no dependency conflicts. If you have Conda installed on your system (see [`miniconda` install instructions](https://docs.conda.io/en/latest/miniconda.html)), you can create a new environment with a simple:
6 |
7 | conda create -n pysipfenn python=3.10 jupyter numpy
8 | conda activate pysipfenn
9 |
10 | If you are managing a large set of dependencies in your project, you may consider using `mamba` in place of `conda`. It is a less mature, but much faster drop-in replacement compatible with existing environments. See [`micromamba` install instructions](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html).
11 |
12 | ## Standard
13 |
14 | If your main goal is to run pySIPFENN models, provided by us or any other vendor, you need only a subset of the capabilities of our code, so
15 | you can follow with the following install. Simply install pySIPFENN:
16 |
17 | - from **PyPI** with `pip`:
18 | ```shell
19 | pip install pysipfenn
20 | ```
21 |
22 | - from **conda-forge** with `conda`:
23 | ```shell
24 | conda install -c conda-forge pysipfenn
25 | ```
26 |
27 | - from **conda-forge** with `micromamba`:
28 | ```shell
29 | micromamba install -c conda-forge pysipfenn
30 | ```
31 |
32 | - **from source**, by cloning. To get a stable version, you can specify a version tag after the URL with
33 | `--branch --single-branch`, or omit it to get the development version (which may have bugs!):
34 | ```shell
35 | git clone https://github.com/PhasesResearchLab/pySIPFENN.git
36 | ```
37 |
38 | then move to `pySIPFENN` directory and install in editable (`-e`) mode.
39 | ```shell
40 | cd pySIPFENN
41 | pip install -e .
42 | ```
43 |
44 | ## Developer Install
45 |
46 | If you want to utilize pySIPFENN beyond its core functionalities, for instance, to train new models on custom datasets or to export models in different
47 | formats or precisions, you need to install several other dependencies. This can be done by following the **from source** instructions above but appending
48 | the last instruction with `dev` _extras_ marker.
49 |
50 | ```shell
51 | pip install -e ".[dev]"
52 | ```
53 |
54 | > Note: `pip install "pysipfenn[dev]"` will also work, but will be less conveninet for model modifications (which you likely want to do), as all persisted
55 | > files will be located outside your working directory. You can quickly find where, by calling `import pysipfenn; c = pysipfenn.Calculator(); print(c)` and
56 | > `Calculator` will tell you (amongst other things) where they are.
--------------------------------------------------------------------------------
/docs/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | pushd %~dp0
4 |
5 | REM Command file for Sphinx documentation
6 |
7 | if "%SPHINXBUILD%" == "" (
8 | set SPHINXBUILD=sphinx-build
9 | )
10 | set SOURCEDIR=.
11 | set BUILDDIR=_build
12 |
13 | %SPHINXBUILD% >NUL 2>NUL
14 | if errorlevel 9009 (
15 | echo.
16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17 | echo.installed, then set the SPHINXBUILD environment variable to point
18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you
19 | echo.may add the Sphinx directory to PATH.
20 | echo.
21 | echo.If you don't have Sphinx installed, grab it from
22 | echo.https://www.sphinx-doc.org/
23 | exit /b 1
24 | )
25 |
26 | if "%1" == "" goto help
27 |
28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29 | goto end
30 |
31 | :help
32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33 |
34 | :end
35 | popd
36 |
--------------------------------------------------------------------------------
/docs/miscellaneousnotes.md:
--------------------------------------------------------------------------------
1 | # Miscellaneous Notes for Users
2 |
3 | ## General Useful Tips
4 |
5 | ### Exporting Compressed Pymatgen Structures
6 |
7 | Since [pymatgen v2023.05.31](https://github.com/materialsproject/pymatgen/releases/tag/v2023.05.31), or [PR#3003](https://github.com/materialsproject/pymatgen/pull/3003), you can compress Structure objects you export to JSON as in this simple example below. Considering the high volume of JSON's "boilerplate" in them, this should allow you to reduce file size by around half.
8 |
9 | ```python
10 | from pymatgen.core import Lattice, Structure
11 |
12 | FeO = Structure(
13 | lattice=Lattice.cubic(5),
14 | species=("Fe", "O"),
15 | coords=((0, 0, 0), (0.5, 0.5, 0.5)),
16 | )
17 |
18 | structure.to("FeO.json.gz")
19 | structure.to("FeO.json.bz2")
20 | ```
21 |
22 | ## pySIPFENN Tricks
23 |
24 |
25 | ## Experimental
--------------------------------------------------------------------------------
/docs/source/modules.rst:
--------------------------------------------------------------------------------
1 | pysipfenn
2 | =========
3 |
4 | .. toctree::
5 | :maxdepth: 6
6 |
7 | pysipfenn
8 |
--------------------------------------------------------------------------------
/docs/source/pysipfenn.core.rst:
--------------------------------------------------------------------------------
1 | pySIPFENN Core
2 | ==============
3 |
4 | pySIPFENN
5 | ---------
6 |
7 | .. automodule:: pysipfenn
8 | :members:
9 | :undoc-members:
10 | :show-inheritance:
11 |
12 | modelAdjusters
13 | --------------
14 |
15 | .. automodule:: pysipfenn.core.modelAdjusters
16 | :members:
17 | :undoc-members:
18 | :show-inheritance:
19 |
20 | modelExporters
21 | --------------
22 |
23 | .. automodule:: pysipfenn.core.modelExporters
24 | :members:
25 | :undoc-members:
26 | :show-inheritance:
27 |
--------------------------------------------------------------------------------
/docs/source/pysipfenn.descriptorDefinitions.rst:
--------------------------------------------------------------------------------
1 | Featurizers
2 | ===========
3 |
4 | descriptorDefinitions.KS2022
5 | ----------------------------
6 |
7 | .. automodule:: pysipfenn.descriptorDefinitions.KS2022
8 | :members:
9 | :undoc-members:
10 | :show-inheritance:
11 |
12 | descriptorDefinitions.KS2022\_dilute
13 | ------------------------------------
14 |
15 | .. automodule:: pysipfenn.descriptorDefinitions.KS2022_dilute
16 | :members:
17 | :undoc-members:
18 | :show-inheritance:
19 |
20 | descriptorDefinitions.KS2022\_randomSolutions
21 | ------------------------------------
22 |
23 | .. automodule:: pysipfenn.descriptorDefinitions.KS2022_randomSolutions
24 | :members:
25 | :undoc-members:
26 | :show-inheritance:
27 |
28 | descriptorDefinitions.Ward2017
29 | ------------------------------
30 |
31 | .. automodule:: pysipfenn.descriptorDefinitions.Ward2017
32 | :members:
33 | :undoc-members:
34 | :show-inheritance:
35 |
--------------------------------------------------------------------------------
/docs/source/pysipfenn.modelsSIPFENN.rst:
--------------------------------------------------------------------------------
1 | pySIPFENN Models
2 | ================
3 |
4 | All default models for pySIPFENN are stored in the below Zenodo repository, which will be versioned with each release of
5 | new models:
6 |
7 | .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7373089.svg?
8 | :target: https://doi.org/10.5281/zenodo.7373089
9 | :alt: Zenodo DOI
10 |
11 | The model access is governed by the `models.json` file in the `pysipfenn/modelsSIPFENN` directory. For each model, the
12 | file needs to contain:
13 |
14 | * parent dictionary key matching the name of the model file (e.g. `SIPFENN_Krajewski2020_NN20`)
15 | * `name` filed: string of the full name of the model displayed to the user. It can be anything.
16 | * `descriptor` field: string of which descriptor / feature vector is taken as input to the model.
17 | * `URL_ONNX` field: string of the URL to the ONNX model file.
18 |
19 | additionally, the `models.json` file can contain the following optional fields:
20 |
21 | * `URLjson` and `URLparams` fields: strings of the URL to the JSON and params files of an MxNet model. They are provided
22 | for legacy convenience and will be removed in some future release.
23 |
24 | .. note:: In near future, the `models.json` file will also include model metadata such as: model version,
25 | training data information, model training hyperparameters, and key information about the model predictions
26 | including property/properties predicted, units, and range of applicability.
27 |
28 | As of pySIPFENN v0.15.0, the `models.json` file contains the following models:
29 |
30 | .. code-block:: JSON
31 |
32 | {
33 | "SIPFENN_Krajewski2020_NN9": {
34 | "name": "SIPFENN_Krajewski2020 Standard Materials Model",
35 | "URLjson": "https://zenodo.org/record/4279640/files/SIPFENN_Krajewski2020_NN9.json",
36 | "URLparams": "https://zenodo.org/record/4279640/files/SIPFENN_Krajewski2020_NN9.params",
37 | "URL_ONNX": "https://zenodo.org/record/7373089/files/SIPFENN_Krajewski2020_NN9.onnx",
38 | "descriptor": "Ward2017"
39 | },
40 | "SIPFENN_Krajewski2020_NN20": {
41 | "name": "SIPFENN_Krajewski2020 Novel Materials Model",
42 | "URLjson": "https://zenodo.org/record/4279640/files/SIPFENN_Krajewski2020_NN20.json",
43 | "URLparams": "https://zenodo.org/record/4279640/files/SIPFENN_Krajewski2020_NN20.params",
44 | "URL_ONNX": "https://zenodo.org/record/7373089/files/SIPFENN_Krajewski2020_NN20.onnx",
45 | "descriptor": "Ward2017"
46 | },
47 | "SIPFENN_Krajewski2020_NN24": {
48 | "name": "SIPFENN_Krajewski2020 Light Model",
49 | "URLjson": "https://zenodo.org/record/4279640/files/SIPFENN_Krajewski2020_NN24.json",
50 | "URLparams": "https://zenodo.org/record/4279640/files/SIPFENN_Krajewski2020_NN24.params",
51 | "URL_ONNX": "https://zenodo.org/record/7373089/files/SIPFENN_Krajewski2020_NN24.onnx",
52 | "descriptor": "Ward2017"
53 | },
54 | "SIPFENN_Krajewski2022_NN30": {
55 | "name": "SIPFENN_Krajewski2022 KS2022 Novel Materials Model",
56 | "URL_ONNX": "https://zenodo.org/record/7373089/files/SIPFENN_Krajewski2022_NN30.onnx",
57 | "descriptor": "KS2022"
58 | }
59 | }
60 |
61 | Module Contents
62 | ---------------
63 |
64 | .. automodule:: pysipfenn.modelsSIPFENN
65 | :members:
66 | :undoc-members:
67 | :show-inheritance:
68 |
--------------------------------------------------------------------------------
/docs/source/pysipfenn.rst:
--------------------------------------------------------------------------------
1 | pySIPFENN API
2 | =============
3 |
4 | Subpackages
5 | -----------
6 |
7 | .. toctree::
8 | :maxdepth: 6
9 |
10 | pysipfenn.core
11 | pysipfenn.descriptorDefinitions
12 | pysipfenn.modelsSIPFENN
13 | pysipfenn.tests
14 |
15 |
--------------------------------------------------------------------------------
/docs/source/pysipfenn.tests.rst:
--------------------------------------------------------------------------------
1 | pySIPFENN Tests
2 | ===============
3 |
4 | Core pySIPFENN Functionalities
5 | ------------------------------
6 |
7 | .. automodule:: pysipfenn.tests.test_pysipfenn
8 | :members:
9 | :undoc-members:
10 | :show-inheritance:
11 |
12 | KS2022 Featurization Correctness
13 | --------------------------------
14 |
15 | .. automodule:: pysipfenn.tests.test_KS2022
16 | :members:
17 | :undoc-members:
18 | :show-inheritance:
19 |
20 | KS2022 Dilute-Optimized Featurization Correctness
21 | -------------------------------------------------
22 |
23 | .. automodule:: pysipfenn.tests.test_KS2022_dilute
24 | :members:
25 | :undoc-members:
26 | :show-inheritance:
27 |
28 | KS2022 Random Solution Featurization Correctness
29 | ------------------------------------------------
30 |
31 | .. automodule:: pysipfenn.tests.test_KS2022_randomSolution
32 | :members:
33 | :undoc-members:
34 | :show-inheritance:
35 |
36 | Ward2017 Featurization Correctness
37 | ----------------------------------
38 |
39 | .. automodule:: pysipfenn.tests.test_Ward2017
40 | :members:
41 | :undoc-members:
42 | :show-inheritance:
43 |
44 | Auto Runtime of All ONNX Models with Ward2017
45 | ---------------------------------------------
46 |
47 | .. automodule:: pysipfenn.tests.test_AllCompatibleONNX_Ward2017
48 | :members:
49 | :undoc-members:
50 | :show-inheritance:
51 |
52 | Accuracy of NN9 20 24 Predictions Against Reference
53 | ---------------------------------------------------
54 |
55 | .. automodule:: pysipfenn.tests.test_Krajewski2020_NN9NN20NN24_ONNX
56 | :members:
57 | :undoc-members:
58 | :show-inheritance:
59 |
60 | Model Exporters Runtime
61 | -----------------------
62 |
63 | .. automodule:: pysipfenn.tests.test_ModelExporters
64 | :members:
65 | :undoc-members:
66 | :show-inheritance:
67 |
68 | Defining Custom Models
69 | ----------------------
70 |
71 | .. automodule:: pysipfenn.tests.test_customModel
72 | :members:
73 | :undoc-members:
74 | :show-inheritance:
75 |
76 | Automatic Model Tuning with OPTIMADE API
77 | ----------------------------------------
78 |
79 | .. automodule:: pysipfenn.tests.test_ModelAdjusters
80 | :members:
81 | :undoc-members:
82 | :show-inheritance:
83 |
84 |
--------------------------------------------------------------------------------
/example.workshop2023Feb/README.md:
--------------------------------------------------------------------------------
1 | ### pySIPFENN MGF-PSU Workshop (Feb 2023)
2 |
3 | This Jupyter notebook is a brief walkthrough covering core functionalities of
4 | the **pySIPFENN** or **py**(**S**tructure-**I**nformed **P**rediction of
5 | **F**ormation **E**nergy using **N**eural **N**etworks) package; available
6 | through the PyPI repository. It covers:
7 |
8 | 1. Installation
9 | 2. Setup and Run on Directory with Structure Files
10 | 3. (advanced) Calculating the Formation Energy of all 243 End-Members of
11 | 5-Sublattice Sigma Phase (TCP) Ternary System
12 | 4. Combining Results from Different Models
13 | 5. (advanced) Adding a Custom Model
14 |
15 | The release and development branch documentations for pySIPFENN are available at [pysipfenn.org](https://pysipfenn.org)
16 | or by clicking:
17 |
18 | [](https://pysipfenn.readthedocs.io/en/stable/)
19 | [](https://pysipfenn.readthedocs.io/en/latest/)
20 |
21 |
22 | If you are using this software, please cite:
23 | - Adam M. Krajewski, Jonathan W. Siegel, Jinchao Xu, Zi-Kui Liu,
24 | Extensible Structure-Informed Prediction of Formation Energy with improved accuracy and usability employing neural networks,
25 | Computational Materials Science,
26 | Volume 208,
27 | 2022,
28 | 111254
29 | (https://doi.org/10.1016/j.commatsci.2022.111254)
--------------------------------------------------------------------------------
/example.workshop2023Feb/assets/112-Cr12Fe10Ni8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/example.workshop2023Feb/assets/112-Cr12Fe10Ni8.png
--------------------------------------------------------------------------------
/example.workshop2023Feb/assets/NN20_SigmaTransfer_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/example.workshop2023Feb/assets/NN20_SigmaTransfer_3.png
--------------------------------------------------------------------------------
/example.workshop2023Feb/assets/NN20_sigmasqs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/example.workshop2023Feb/assets/NN20_sigmasqs.png
--------------------------------------------------------------------------------
/example.workshop2023Feb/assets/SigmaSQS_plots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/example.workshop2023Feb/assets/SigmaSQS_plots.png
--------------------------------------------------------------------------------
/example.workshop2023Feb/assets/neuralnetcolorized.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/example.workshop2023Feb/assets/neuralnetcolorized.png
--------------------------------------------------------------------------------
/example.workshop2023Feb/assets/transferLearning_vs_datapoints_LinLinOQMD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/example.workshop2023Feb/assets/transferLearning_vs_datapoints_LinLinOQMD.png
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [build-system]
2 | requires = ["setuptools>=61.0", "setuptools-scm"]
3 | build-backend = "setuptools.build_meta"
4 |
5 | [project]
6 | name = "pysipfenn"
7 | version = "0.16.3"
8 | authors = [
9 | { name="Adam Krajewski", email="ak@psu.edu" },
10 | { name="Jonathan Siegel", email="jwsiegel@tamu.edu" },
11 | { name="Ricardo Amaral", email="rna5137@psu.edu" },
12 | ]
13 | classifiers = [
14 | "Programming Language :: Python :: 3",
15 | "Programming Language :: Python :: 3.9",
16 | "Programming Language :: Python :: 3.10",
17 | "Programming Language :: Python :: 3.11",
18 | "Development Status :: 4 - Beta",
19 | "Intended Audience :: Science/Research",
20 | "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
21 | "Operating System :: OS Independent",
22 | "Topic :: Scientific/Engineering",
23 | "Topic :: Scientific/Engineering :: Artificial Intelligence",
24 | "Topic :: Scientific/Engineering :: Chemistry",
25 | "Topic :: Scientific/Engineering :: Physics",
26 | ]
27 | description = "Python toolset for Structure-Informed Property and Feature Engineering with Neural Networks. It offers unique advantages through (1) effortless extensibility, (2) optimizations for ordered, dilute, and random atomic configurations, and (3) automated model tuning."
28 | readme = "README.md"
29 |
30 | requires-python = ">=3.9"
31 | dependencies = [
32 | "pymatgen>=2024.2.20",
33 | "spglib==2.0.2",
34 | "torch>=2.1.0",
35 | "onnx2torch>=1.5.2",
36 | "onnx>=1.13.0",
37 | "numpy>=1.25.0,<2.0.0",
38 | "tqdm>=4.65.0",
39 | "natsort>=8.3.0",
40 | "pymongo>=4.4",
41 | "pysmartdl2>=2.0.0",
42 | "plotly>=5.15.0",
43 | "dnspython",
44 | "ruamel.yaml",
45 | "colorama"
46 | ]
47 |
48 | [project.optional-dependencies]
49 | dev = [
50 | "coremltools>=7.0",
51 | "onnxconverter_common>=1.14.0",
52 | "onnxsim==0.4.33",
53 | "onnxruntime>=1.16.0",
54 | "optimade[http_client]>=1.0.0"
55 | ]
56 |
57 | [project.urls]
58 | "Repository" = "https://git.pysipfenn.org"
59 | "Homepage" = "https://pysipfenn.org"
60 | "Bug Tracker" = "https://github.com/PhasesResearchLab/pySIPFENN/issues"
61 |
--------------------------------------------------------------------------------
/pysipfenn/__init__.py:
--------------------------------------------------------------------------------
1 | # Importing from top pySIPFENN namespace...
2 | from pysipfenn.core.pysipfenn import *
3 | from pysipfenn.core.modelExporters import *
4 | from pysipfenn.core.modelAdjusters import *
5 |
--------------------------------------------------------------------------------
/pysipfenn/core/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/pysipfenn/core/__init__.py
--------------------------------------------------------------------------------
/pysipfenn/descriptorDefinitions/README.md:
--------------------------------------------------------------------------------
1 | # pySIPFENN Descriptor Definitions Directory
2 | This is the default folder in which pySIPFENN **feature calculators** are defined. Each of them is an independent software requireing only `pysipfenn` to be present in the system, thus you can easily separate them from main library, customize, and use independently. Notes:
3 | - Please refer to the documentation page for details.
4 | - Each of them generates numpy `ndarray` output, where features are indexed in the same order as in corresponding `labels_***.csv` files present here.
5 | - `assets` stores miscellenious files, like graphics, not needed for functional purposes.
--------------------------------------------------------------------------------
/pysipfenn/descriptorDefinitions/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/pysipfenn/descriptorDefinitions/__init__.py
--------------------------------------------------------------------------------
/pysipfenn/descriptorDefinitions/assets/KS2022_randomSolution_ConvergencePlot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/pysipfenn/descriptorDefinitions/assets/KS2022_randomSolution_ConvergencePlot.png
--------------------------------------------------------------------------------
/pysipfenn/descriptorDefinitions/labels_KS2022.csv:
--------------------------------------------------------------------------------
1 | mean_EffectiveCoordination
2 | var_EffectiveCoordination
3 | min_EffectiveCoordination
4 | max_EffectiveCoordination
5 | var_MeanBondLength
6 | min_MeanBondLength
7 | max_MeanBondLength
8 | mean_BondLengthVariation
9 | var_BondLengthVariation
10 | min_BondLengthVariation
11 | max_BondLengthVariation
12 | var_CellVolume
13 | MaxPackingEfficiency
14 | mean_NeighDiff_shell1_Number
15 | var_NeighDiff_shell1_Number
16 | min_NeighDiff_shell1_Number
17 | max_NeighDiff_shell1_Number
18 | range_NeighDiff_shell1_Number
19 | mean_NeighDiff_shell1_MendeleevNumber
20 | var_NeighDiff_shell1_MendeleevNumber
21 | min_NeighDiff_shell1_MendeleevNumber
22 | max_NeighDiff_shell1_MendeleevNumber
23 | range_NeighDiff_shell1_MendeleevNumber
24 | mean_NeighDiff_shell1_AtomicWeight
25 | var_NeighDiff_shell1_AtomicWeight
26 | min_NeighDiff_shell1_AtomicWeight
27 | max_NeighDiff_shell1_AtomicWeight
28 | range_NeighDiff_shell1_AtomicWeight
29 | mean_NeighDiff_shell1_MeltingT
30 | var_NeighDiff_shell1_MeltingT
31 | min_NeighDiff_shell1_MeltingT
32 | max_NeighDiff_shell1_MeltingT
33 | range_NeighDiff_shell1_MeltingT
34 | mean_NeighDiff_shell1_Column
35 | var_NeighDiff_shell1_Column
36 | min_NeighDiff_shell1_Column
37 | max_NeighDiff_shell1_Column
38 | range_NeighDiff_shell1_Column
39 | mean_NeighDiff_shell1_Row
40 | var_NeighDiff_shell1_Row
41 | min_NeighDiff_shell1_Row
42 | max_NeighDiff_shell1_Row
43 | range_NeighDiff_shell1_Row
44 | mean_NeighDiff_shell1_CovalentRadius
45 | var_NeighDiff_shell1_CovalentRadius
46 | min_NeighDiff_shell1_CovalentRadius
47 | max_NeighDiff_shell1_CovalentRadius
48 | range_NeighDiff_shell1_CovalentRadius
49 | mean_NeighDiff_shell1_Electronegativity
50 | var_NeighDiff_shell1_Electronegativity
51 | min_NeighDiff_shell1_Electronegativity
52 | max_NeighDiff_shell1_Electronegativity
53 | range_NeighDiff_shell1_Electronegativity
54 | mean_NeighDiff_shell1_NsValence
55 | var_NeighDiff_shell1_NsValence
56 | min_NeighDiff_shell1_NsValence
57 | max_NeighDiff_shell1_NsValence
58 | range_NeighDiff_shell1_NsValence
59 | mean_NeighDiff_shell1_NpValence
60 | var_NeighDiff_shell1_NpValence
61 | min_NeighDiff_shell1_NpValence
62 | max_NeighDiff_shell1_NpValence
63 | range_NeighDiff_shell1_NpValence
64 | mean_NeighDiff_shell1_NdValence
65 | var_NeighDiff_shell1_NdValence
66 | min_NeighDiff_shell1_NdValence
67 | max_NeighDiff_shell1_NdValence
68 | range_NeighDiff_shell1_NdValence
69 | mean_NeighDiff_shell1_NfValence
70 | var_NeighDiff_shell1_NfValence
71 | min_NeighDiff_shell1_NfValence
72 | max_NeighDiff_shell1_NfValence
73 | range_NeighDiff_shell1_NfValence
74 | mean_NeighDiff_shell1_NValance
75 | var_NeighDiff_shell1_NValance
76 | min_NeighDiff_shell1_NValance
77 | max_NeighDiff_shell1_NValance
78 | range_NeighDiff_shell1_NValance
79 | mean_NeighDiff_shell1_NsUnfilled
80 | var_NeighDiff_shell1_NsUnfilled
81 | min_NeighDiff_shell1_NsUnfilled
82 | max_NeighDiff_shell1_NsUnfilled
83 | range_NeighDiff_shell1_NsUnfilled
84 | mean_NeighDiff_shell1_NpUnfilled
85 | var_NeighDiff_shell1_NpUnfilled
86 | min_NeighDiff_shell1_NpUnfilled
87 | max_NeighDiff_shell1_NpUnfilled
88 | range_NeighDiff_shell1_NpUnfilled
89 | mean_NeighDiff_shell1_NdUnfilled
90 | var_NeighDiff_shell1_NdUnfilled
91 | min_NeighDiff_shell1_NdUnfilled
92 | max_NeighDiff_shell1_NdUnfilled
93 | range_NeighDiff_shell1_NdUnfilled
94 | mean_NeighDiff_shell1_NfUnfilled
95 | var_NeighDiff_shell1_NfUnfilled
96 | min_NeighDiff_shell1_NfUnfilled
97 | max_NeighDiff_shell1_NfUnfilled
98 | range_NeighDiff_shell1_NfUnfilled
99 | mean_NeighDiff_shell1_NUnfilled
100 | var_NeighDiff_shell1_NUnfilled
101 | min_NeighDiff_shell1_NUnfilled
102 | max_NeighDiff_shell1_NUnfilled
103 | range_NeighDiff_shell1_NUnfilled
104 | mean_NeighDiff_shell1_GSvolume_pa
105 | var_NeighDiff_shell1_GSvolume_pa
106 | min_NeighDiff_shell1_GSvolume_pa
107 | max_NeighDiff_shell1_GSvolume_pa
108 | range_NeighDiff_shell1_GSvolume_pa
109 | mean_NeighDiff_shell1_GSbandgap
110 | var_NeighDiff_shell1_GSbandgap
111 | min_NeighDiff_shell1_GSbandgap
112 | max_NeighDiff_shell1_GSbandgap
113 | range_NeighDiff_shell1_GSbandgap
114 | mean_NeighDiff_shell1_GSmagmom
115 | var_NeighDiff_shell1_GSmagmom
116 | min_NeighDiff_shell1_GSmagmom
117 | max_NeighDiff_shell1_GSmagmom
118 | range_NeighDiff_shell1_GSmagmom
119 | NComp
120 | Comp_L2Norm
121 | Comp_L3Norm
122 | Comp_L5Norm
123 | Comp_L7Norm
124 | Comp_L10Norm
125 | mean_Number
126 | maxdiff_Number
127 | dev_Number
128 | max_Number
129 | min_Number
130 | most_Number
131 | mean_MendeleevNumber
132 | maxdiff_MendeleevNumber
133 | dev_MendeleevNumber
134 | max_MendeleevNumber
135 | min_MendeleevNumber
136 | most_MendeleevNumber
137 | mean_AtomicWeight
138 | maxdiff_AtomicWeight
139 | dev_AtomicWeight
140 | max_AtomicWeight
141 | min_AtomicWeight
142 | most_AtomicWeight
143 | mean_MeltingT
144 | maxdiff_MeltingT
145 | dev_MeltingT
146 | max_MeltingT
147 | min_MeltingT
148 | most_MeltingT
149 | mean_Column
150 | maxdiff_Column
151 | dev_Column
152 | max_Column
153 | min_Column
154 | most_Column
155 | mean_Row
156 | maxdiff_Row
157 | dev_Row
158 | max_Row
159 | min_Row
160 | most_Row
161 | mean_CovalentRadius
162 | maxdiff_CovalentRadius
163 | dev_CovalentRadius
164 | max_CovalentRadius
165 | min_CovalentRadius
166 | most_CovalentRadius
167 | mean_Electronegativity
168 | maxdiff_Electronegativity
169 | dev_Electronegativity
170 | max_Electronegativity
171 | min_Electronegativity
172 | most_Electronegativity
173 | mean_NsValence
174 | maxdiff_NsValence
175 | dev_NsValence
176 | max_NsValence
177 | min_NsValence
178 | most_NsValence
179 | mean_NpValence
180 | maxdiff_NpValence
181 | dev_NpValence
182 | max_NpValence
183 | min_NpValence
184 | most_NpValence
185 | mean_NdValence
186 | maxdiff_NdValence
187 | dev_NdValence
188 | max_NdValence
189 | min_NdValence
190 | most_NdValence
191 | mean_NfValence
192 | maxdiff_NfValence
193 | dev_NfValence
194 | max_NfValence
195 | min_NfValence
196 | most_NfValence
197 | mean_NValance
198 | maxdiff_NValance
199 | dev_NValance
200 | max_NValance
201 | min_NValance
202 | most_NValance
203 | mean_NsUnfilled
204 | maxdiff_NsUnfilled
205 | dev_NsUnfilled
206 | max_NsUnfilled
207 | min_NsUnfilled
208 | most_NsUnfilled
209 | mean_NpUnfilled
210 | maxdiff_NpUnfilled
211 | dev_NpUnfilled
212 | max_NpUnfilled
213 | min_NpUnfilled
214 | most_NpUnfilled
215 | mean_NdUnfilled
216 | maxdiff_NdUnfilled
217 | dev_NdUnfilled
218 | max_NdUnfilled
219 | min_NdUnfilled
220 | most_NdUnfilled
221 | mean_NfUnfilled
222 | maxdiff_NfUnfilled
223 | dev_NfUnfilled
224 | max_NfUnfilled
225 | min_NfUnfilled
226 | most_NfUnfilled
227 | mean_NUnfilled
228 | maxdiff_NUnfilled
229 | dev_NUnfilled
230 | max_NUnfilled
231 | min_NUnfilled
232 | most_NUnfilled
233 | mean_GSvolume_pa
234 | maxdiff_GSvolume_pa
235 | dev_GSvolume_pa
236 | max_GSvolume_pa
237 | min_GSvolume_pa
238 | most_GSvolume_pa
239 | mean_GSbandgap
240 | maxdiff_GSbandgap
241 | dev_GSbandgap
242 | max_GSbandgap
243 | min_GSbandgap
244 | most_GSbandgap
245 | mean_GSmagmom
246 | maxdiff_GSmagmom
247 | dev_GSmagmom
248 | max_GSmagmom
249 | min_GSmagmom
250 | most_GSmagmom
251 | frac_sValence
252 | frac_pValence
253 | frac_dValence
254 | frac_fValence
255 | MaxIonicChar
256 | MeanIonicChar
257 |
--------------------------------------------------------------------------------
/pysipfenn/descriptorDefinitions/labels_KS2022_dilute.csv:
--------------------------------------------------------------------------------
1 | mean_EffectiveCoordination
2 | var_EffectiveCoordination
3 | min_EffectiveCoordination
4 | max_EffectiveCoordination
5 | var_MeanBondLength
6 | min_MeanBondLength
7 | max_MeanBondLength
8 | mean_BondLengthVariation
9 | var_BondLengthVariation
10 | min_BondLengthVariation
11 | max_BondLengthVariation
12 | var_CellVolume
13 | MaxPackingEfficiency
14 | mean_NeighDiff_shell1_Number
15 | var_NeighDiff_shell1_Number
16 | min_NeighDiff_shell1_Number
17 | max_NeighDiff_shell1_Number
18 | range_NeighDiff_shell1_Number
19 | mean_NeighDiff_shell1_MendeleevNumber
20 | var_NeighDiff_shell1_MendeleevNumber
21 | min_NeighDiff_shell1_MendeleevNumber
22 | max_NeighDiff_shell1_MendeleevNumber
23 | range_NeighDiff_shell1_MendeleevNumber
24 | mean_NeighDiff_shell1_AtomicWeight
25 | var_NeighDiff_shell1_AtomicWeight
26 | min_NeighDiff_shell1_AtomicWeight
27 | max_NeighDiff_shell1_AtomicWeight
28 | range_NeighDiff_shell1_AtomicWeight
29 | mean_NeighDiff_shell1_MeltingT
30 | var_NeighDiff_shell1_MeltingT
31 | min_NeighDiff_shell1_MeltingT
32 | max_NeighDiff_shell1_MeltingT
33 | range_NeighDiff_shell1_MeltingT
34 | mean_NeighDiff_shell1_Column
35 | var_NeighDiff_shell1_Column
36 | min_NeighDiff_shell1_Column
37 | max_NeighDiff_shell1_Column
38 | range_NeighDiff_shell1_Column
39 | mean_NeighDiff_shell1_Row
40 | var_NeighDiff_shell1_Row
41 | min_NeighDiff_shell1_Row
42 | max_NeighDiff_shell1_Row
43 | range_NeighDiff_shell1_Row
44 | mean_NeighDiff_shell1_CovalentRadius
45 | var_NeighDiff_shell1_CovalentRadius
46 | min_NeighDiff_shell1_CovalentRadius
47 | max_NeighDiff_shell1_CovalentRadius
48 | range_NeighDiff_shell1_CovalentRadius
49 | mean_NeighDiff_shell1_Electronegativity
50 | var_NeighDiff_shell1_Electronegativity
51 | min_NeighDiff_shell1_Electronegativity
52 | max_NeighDiff_shell1_Electronegativity
53 | range_NeighDiff_shell1_Electronegativity
54 | mean_NeighDiff_shell1_NsValence
55 | var_NeighDiff_shell1_NsValence
56 | min_NeighDiff_shell1_NsValence
57 | max_NeighDiff_shell1_NsValence
58 | range_NeighDiff_shell1_NsValence
59 | mean_NeighDiff_shell1_NpValence
60 | var_NeighDiff_shell1_NpValence
61 | min_NeighDiff_shell1_NpValence
62 | max_NeighDiff_shell1_NpValence
63 | range_NeighDiff_shell1_NpValence
64 | mean_NeighDiff_shell1_NdValence
65 | var_NeighDiff_shell1_NdValence
66 | min_NeighDiff_shell1_NdValence
67 | max_NeighDiff_shell1_NdValence
68 | range_NeighDiff_shell1_NdValence
69 | mean_NeighDiff_shell1_NfValence
70 | var_NeighDiff_shell1_NfValence
71 | min_NeighDiff_shell1_NfValence
72 | max_NeighDiff_shell1_NfValence
73 | range_NeighDiff_shell1_NfValence
74 | mean_NeighDiff_shell1_NValance
75 | var_NeighDiff_shell1_NValance
76 | min_NeighDiff_shell1_NValance
77 | max_NeighDiff_shell1_NValance
78 | range_NeighDiff_shell1_NValance
79 | mean_NeighDiff_shell1_NsUnfilled
80 | var_NeighDiff_shell1_NsUnfilled
81 | min_NeighDiff_shell1_NsUnfilled
82 | max_NeighDiff_shell1_NsUnfilled
83 | range_NeighDiff_shell1_NsUnfilled
84 | mean_NeighDiff_shell1_NpUnfilled
85 | var_NeighDiff_shell1_NpUnfilled
86 | min_NeighDiff_shell1_NpUnfilled
87 | max_NeighDiff_shell1_NpUnfilled
88 | range_NeighDiff_shell1_NpUnfilled
89 | mean_NeighDiff_shell1_NdUnfilled
90 | var_NeighDiff_shell1_NdUnfilled
91 | min_NeighDiff_shell1_NdUnfilled
92 | max_NeighDiff_shell1_NdUnfilled
93 | range_NeighDiff_shell1_NdUnfilled
94 | mean_NeighDiff_shell1_NfUnfilled
95 | var_NeighDiff_shell1_NfUnfilled
96 | min_NeighDiff_shell1_NfUnfilled
97 | max_NeighDiff_shell1_NfUnfilled
98 | range_NeighDiff_shell1_NfUnfilled
99 | mean_NeighDiff_shell1_NUnfilled
100 | var_NeighDiff_shell1_NUnfilled
101 | min_NeighDiff_shell1_NUnfilled
102 | max_NeighDiff_shell1_NUnfilled
103 | range_NeighDiff_shell1_NUnfilled
104 | mean_NeighDiff_shell1_GSvolume_pa
105 | var_NeighDiff_shell1_GSvolume_pa
106 | min_NeighDiff_shell1_GSvolume_pa
107 | max_NeighDiff_shell1_GSvolume_pa
108 | range_NeighDiff_shell1_GSvolume_pa
109 | mean_NeighDiff_shell1_GSbandgap
110 | var_NeighDiff_shell1_GSbandgap
111 | min_NeighDiff_shell1_GSbandgap
112 | max_NeighDiff_shell1_GSbandgap
113 | range_NeighDiff_shell1_GSbandgap
114 | mean_NeighDiff_shell1_GSmagmom
115 | var_NeighDiff_shell1_GSmagmom
116 | min_NeighDiff_shell1_GSmagmom
117 | max_NeighDiff_shell1_GSmagmom
118 | range_NeighDiff_shell1_GSmagmom
119 | NComp
120 | Comp_L2Norm
121 | Comp_L3Norm
122 | Comp_L5Norm
123 | Comp_L7Norm
124 | Comp_L10Norm
125 | mean_Number
126 | maxdiff_Number
127 | dev_Number
128 | max_Number
129 | min_Number
130 | most_Number
131 | mean_MendeleevNumber
132 | maxdiff_MendeleevNumber
133 | dev_MendeleevNumber
134 | max_MendeleevNumber
135 | min_MendeleevNumber
136 | most_MendeleevNumber
137 | mean_AtomicWeight
138 | maxdiff_AtomicWeight
139 | dev_AtomicWeight
140 | max_AtomicWeight
141 | min_AtomicWeight
142 | most_AtomicWeight
143 | mean_MeltingT
144 | maxdiff_MeltingT
145 | dev_MeltingT
146 | max_MeltingT
147 | min_MeltingT
148 | most_MeltingT
149 | mean_Column
150 | maxdiff_Column
151 | dev_Column
152 | max_Column
153 | min_Column
154 | most_Column
155 | mean_Row
156 | maxdiff_Row
157 | dev_Row
158 | max_Row
159 | min_Row
160 | most_Row
161 | mean_CovalentRadius
162 | maxdiff_CovalentRadius
163 | dev_CovalentRadius
164 | max_CovalentRadius
165 | min_CovalentRadius
166 | most_CovalentRadius
167 | mean_Electronegativity
168 | maxdiff_Electronegativity
169 | dev_Electronegativity
170 | max_Electronegativity
171 | min_Electronegativity
172 | most_Electronegativity
173 | mean_NsValence
174 | maxdiff_NsValence
175 | dev_NsValence
176 | max_NsValence
177 | min_NsValence
178 | most_NsValence
179 | mean_NpValence
180 | maxdiff_NpValence
181 | dev_NpValence
182 | max_NpValence
183 | min_NpValence
184 | most_NpValence
185 | mean_NdValence
186 | maxdiff_NdValence
187 | dev_NdValence
188 | max_NdValence
189 | min_NdValence
190 | most_NdValence
191 | mean_NfValence
192 | maxdiff_NfValence
193 | dev_NfValence
194 | max_NfValence
195 | min_NfValence
196 | most_NfValence
197 | mean_NValance
198 | maxdiff_NValance
199 | dev_NValance
200 | max_NValance
201 | min_NValance
202 | most_NValance
203 | mean_NsUnfilled
204 | maxdiff_NsUnfilled
205 | dev_NsUnfilled
206 | max_NsUnfilled
207 | min_NsUnfilled
208 | most_NsUnfilled
209 | mean_NpUnfilled
210 | maxdiff_NpUnfilled
211 | dev_NpUnfilled
212 | max_NpUnfilled
213 | min_NpUnfilled
214 | most_NpUnfilled
215 | mean_NdUnfilled
216 | maxdiff_NdUnfilled
217 | dev_NdUnfilled
218 | max_NdUnfilled
219 | min_NdUnfilled
220 | most_NdUnfilled
221 | mean_NfUnfilled
222 | maxdiff_NfUnfilled
223 | dev_NfUnfilled
224 | max_NfUnfilled
225 | min_NfUnfilled
226 | most_NfUnfilled
227 | mean_NUnfilled
228 | maxdiff_NUnfilled
229 | dev_NUnfilled
230 | max_NUnfilled
231 | min_NUnfilled
232 | most_NUnfilled
233 | mean_GSvolume_pa
234 | maxdiff_GSvolume_pa
235 | dev_GSvolume_pa
236 | max_GSvolume_pa
237 | min_GSvolume_pa
238 | most_GSvolume_pa
239 | mean_GSbandgap
240 | maxdiff_GSbandgap
241 | dev_GSbandgap
242 | max_GSbandgap
243 | min_GSbandgap
244 | most_GSbandgap
245 | mean_GSmagmom
246 | maxdiff_GSmagmom
247 | dev_GSmagmom
248 | max_GSmagmom
249 | min_GSmagmom
250 | most_GSmagmom
251 | frac_sValence
252 | frac_pValence
253 | frac_dValence
254 | frac_fValence
255 | MaxIonicChar
256 | MeanIonicChar
257 |
--------------------------------------------------------------------------------
/pysipfenn/descriptorDefinitions/labels_KS2022_randomSolutions.csv:
--------------------------------------------------------------------------------
1 | mean_EffectiveCoordination
2 | var_EffectiveCoordination
3 | min_EffectiveCoordination
4 | max_EffectiveCoordination
5 | var_MeanBondLength
6 | min_MeanBondLength
7 | max_MeanBondLength
8 | mean_BondLengthVariation
9 | var_BondLengthVariation
10 | min_BondLengthVariation
11 | max_BondLengthVariation
12 | var_CellVolume
13 | MaxPackingEfficiency
14 | mean_NeighDiff_shell1_Number
15 | var_NeighDiff_shell1_Number
16 | min_NeighDiff_shell1_Number
17 | max_NeighDiff_shell1_Number
18 | range_NeighDiff_shell1_Number
19 | mean_NeighDiff_shell1_MendeleevNumber
20 | var_NeighDiff_shell1_MendeleevNumber
21 | min_NeighDiff_shell1_MendeleevNumber
22 | max_NeighDiff_shell1_MendeleevNumber
23 | range_NeighDiff_shell1_MendeleevNumber
24 | mean_NeighDiff_shell1_AtomicWeight
25 | var_NeighDiff_shell1_AtomicWeight
26 | min_NeighDiff_shell1_AtomicWeight
27 | max_NeighDiff_shell1_AtomicWeight
28 | range_NeighDiff_shell1_AtomicWeight
29 | mean_NeighDiff_shell1_MeltingT
30 | var_NeighDiff_shell1_MeltingT
31 | min_NeighDiff_shell1_MeltingT
32 | max_NeighDiff_shell1_MeltingT
33 | range_NeighDiff_shell1_MeltingT
34 | mean_NeighDiff_shell1_Column
35 | var_NeighDiff_shell1_Column
36 | min_NeighDiff_shell1_Column
37 | max_NeighDiff_shell1_Column
38 | range_NeighDiff_shell1_Column
39 | mean_NeighDiff_shell1_Row
40 | var_NeighDiff_shell1_Row
41 | min_NeighDiff_shell1_Row
42 | max_NeighDiff_shell1_Row
43 | range_NeighDiff_shell1_Row
44 | mean_NeighDiff_shell1_CovalentRadius
45 | var_NeighDiff_shell1_CovalentRadius
46 | min_NeighDiff_shell1_CovalentRadius
47 | max_NeighDiff_shell1_CovalentRadius
48 | range_NeighDiff_shell1_CovalentRadius
49 | mean_NeighDiff_shell1_Electronegativity
50 | var_NeighDiff_shell1_Electronegativity
51 | min_NeighDiff_shell1_Electronegativity
52 | max_NeighDiff_shell1_Electronegativity
53 | range_NeighDiff_shell1_Electronegativity
54 | mean_NeighDiff_shell1_NsValence
55 | var_NeighDiff_shell1_NsValence
56 | min_NeighDiff_shell1_NsValence
57 | max_NeighDiff_shell1_NsValence
58 | range_NeighDiff_shell1_NsValence
59 | mean_NeighDiff_shell1_NpValence
60 | var_NeighDiff_shell1_NpValence
61 | min_NeighDiff_shell1_NpValence
62 | max_NeighDiff_shell1_NpValence
63 | range_NeighDiff_shell1_NpValence
64 | mean_NeighDiff_shell1_NdValence
65 | var_NeighDiff_shell1_NdValence
66 | min_NeighDiff_shell1_NdValence
67 | max_NeighDiff_shell1_NdValence
68 | range_NeighDiff_shell1_NdValence
69 | mean_NeighDiff_shell1_NfValence
70 | var_NeighDiff_shell1_NfValence
71 | min_NeighDiff_shell1_NfValence
72 | max_NeighDiff_shell1_NfValence
73 | range_NeighDiff_shell1_NfValence
74 | mean_NeighDiff_shell1_NValance
75 | var_NeighDiff_shell1_NValance
76 | min_NeighDiff_shell1_NValance
77 | max_NeighDiff_shell1_NValance
78 | range_NeighDiff_shell1_NValance
79 | mean_NeighDiff_shell1_NsUnfilled
80 | var_NeighDiff_shell1_NsUnfilled
81 | min_NeighDiff_shell1_NsUnfilled
82 | max_NeighDiff_shell1_NsUnfilled
83 | range_NeighDiff_shell1_NsUnfilled
84 | mean_NeighDiff_shell1_NpUnfilled
85 | var_NeighDiff_shell1_NpUnfilled
86 | min_NeighDiff_shell1_NpUnfilled
87 | max_NeighDiff_shell1_NpUnfilled
88 | range_NeighDiff_shell1_NpUnfilled
89 | mean_NeighDiff_shell1_NdUnfilled
90 | var_NeighDiff_shell1_NdUnfilled
91 | min_NeighDiff_shell1_NdUnfilled
92 | max_NeighDiff_shell1_NdUnfilled
93 | range_NeighDiff_shell1_NdUnfilled
94 | mean_NeighDiff_shell1_NfUnfilled
95 | var_NeighDiff_shell1_NfUnfilled
96 | min_NeighDiff_shell1_NfUnfilled
97 | max_NeighDiff_shell1_NfUnfilled
98 | range_NeighDiff_shell1_NfUnfilled
99 | mean_NeighDiff_shell1_NUnfilled
100 | var_NeighDiff_shell1_NUnfilled
101 | min_NeighDiff_shell1_NUnfilled
102 | max_NeighDiff_shell1_NUnfilled
103 | range_NeighDiff_shell1_NUnfilled
104 | mean_NeighDiff_shell1_GSvolume_pa
105 | var_NeighDiff_shell1_GSvolume_pa
106 | min_NeighDiff_shell1_GSvolume_pa
107 | max_NeighDiff_shell1_GSvolume_pa
108 | range_NeighDiff_shell1_GSvolume_pa
109 | mean_NeighDiff_shell1_GSbandgap
110 | var_NeighDiff_shell1_GSbandgap
111 | min_NeighDiff_shell1_GSbandgap
112 | max_NeighDiff_shell1_GSbandgap
113 | range_NeighDiff_shell1_GSbandgap
114 | mean_NeighDiff_shell1_GSmagmom
115 | var_NeighDiff_shell1_GSmagmom
116 | min_NeighDiff_shell1_GSmagmom
117 | max_NeighDiff_shell1_GSmagmom
118 | range_NeighDiff_shell1_GSmagmom
119 | NComp
120 | Comp_L2Norm
121 | Comp_L3Norm
122 | Comp_L5Norm
123 | Comp_L7Norm
124 | Comp_L10Norm
125 | mean_Number
126 | maxdiff_Number
127 | dev_Number
128 | max_Number
129 | min_Number
130 | most_Number
131 | mean_MendeleevNumber
132 | maxdiff_MendeleevNumber
133 | dev_MendeleevNumber
134 | max_MendeleevNumber
135 | min_MendeleevNumber
136 | most_MendeleevNumber
137 | mean_AtomicWeight
138 | maxdiff_AtomicWeight
139 | dev_AtomicWeight
140 | max_AtomicWeight
141 | min_AtomicWeight
142 | most_AtomicWeight
143 | mean_MeltingT
144 | maxdiff_MeltingT
145 | dev_MeltingT
146 | max_MeltingT
147 | min_MeltingT
148 | most_MeltingT
149 | mean_Column
150 | maxdiff_Column
151 | dev_Column
152 | max_Column
153 | min_Column
154 | most_Column
155 | mean_Row
156 | maxdiff_Row
157 | dev_Row
158 | max_Row
159 | min_Row
160 | most_Row
161 | mean_CovalentRadius
162 | maxdiff_CovalentRadius
163 | dev_CovalentRadius
164 | max_CovalentRadius
165 | min_CovalentRadius
166 | most_CovalentRadius
167 | mean_Electronegativity
168 | maxdiff_Electronegativity
169 | dev_Electronegativity
170 | max_Electronegativity
171 | min_Electronegativity
172 | most_Electronegativity
173 | mean_NsValence
174 | maxdiff_NsValence
175 | dev_NsValence
176 | max_NsValence
177 | min_NsValence
178 | most_NsValence
179 | mean_NpValence
180 | maxdiff_NpValence
181 | dev_NpValence
182 | max_NpValence
183 | min_NpValence
184 | most_NpValence
185 | mean_NdValence
186 | maxdiff_NdValence
187 | dev_NdValence
188 | max_NdValence
189 | min_NdValence
190 | most_NdValence
191 | mean_NfValence
192 | maxdiff_NfValence
193 | dev_NfValence
194 | max_NfValence
195 | min_NfValence
196 | most_NfValence
197 | mean_NValance
198 | maxdiff_NValance
199 | dev_NValance
200 | max_NValance
201 | min_NValance
202 | most_NValance
203 | mean_NsUnfilled
204 | maxdiff_NsUnfilled
205 | dev_NsUnfilled
206 | max_NsUnfilled
207 | min_NsUnfilled
208 | most_NsUnfilled
209 | mean_NpUnfilled
210 | maxdiff_NpUnfilled
211 | dev_NpUnfilled
212 | max_NpUnfilled
213 | min_NpUnfilled
214 | most_NpUnfilled
215 | mean_NdUnfilled
216 | maxdiff_NdUnfilled
217 | dev_NdUnfilled
218 | max_NdUnfilled
219 | min_NdUnfilled
220 | most_NdUnfilled
221 | mean_NfUnfilled
222 | maxdiff_NfUnfilled
223 | dev_NfUnfilled
224 | max_NfUnfilled
225 | min_NfUnfilled
226 | most_NfUnfilled
227 | mean_NUnfilled
228 | maxdiff_NUnfilled
229 | dev_NUnfilled
230 | max_NUnfilled
231 | min_NUnfilled
232 | most_NUnfilled
233 | mean_GSvolume_pa
234 | maxdiff_GSvolume_pa
235 | dev_GSvolume_pa
236 | max_GSvolume_pa
237 | min_GSvolume_pa
238 | most_GSvolume_pa
239 | mean_GSbandgap
240 | maxdiff_GSbandgap
241 | dev_GSbandgap
242 | max_GSbandgap
243 | min_GSbandgap
244 | most_GSbandgap
245 | mean_GSmagmom
246 | maxdiff_GSmagmom
247 | dev_GSmagmom
248 | max_GSmagmom
249 | min_GSmagmom
250 | most_GSmagmom
251 | frac_sValence
252 | frac_pValence
253 | frac_dValence
254 | frac_fValence
255 | MaxIonicChar
256 | MeanIonicChar
257 |
--------------------------------------------------------------------------------
/pysipfenn/descriptorDefinitions/labels_Ward2017.csv:
--------------------------------------------------------------------------------
1 | mean_EffectiveCoordination
2 | var_EffectiveCoordination
3 | min_EffectiveCoordination
4 | max_EffectiveCoordination
5 | var_MeanBondLength
6 | min_MeanBondLength
7 | max_MeanBondLength
8 | mean_BondLengthVariation
9 | var_BondLengthVariation
10 | min_BondLengthVariation
11 | max_BondLengthVariation
12 | var_CellVolume
13 | mean_WCMagnitude_Shell1
14 | mean_WCMagnitude_Shell2
15 | mean_WCMagnitude_Shell3
16 | MaxPackingEfficiency
17 | mean_NeighDiff_shell1_Number
18 | var_NeighDiff_shell1_Number
19 | min_NeighDiff_shell1_Number
20 | max_NeighDiff_shell1_Number
21 | range_NeighDiff_shell1_Number
22 | mean_NeighDiff_shell1_MendeleevNumber
23 | var_NeighDiff_shell1_MendeleevNumber
24 | min_NeighDiff_shell1_MendeleevNumber
25 | max_NeighDiff_shell1_MendeleevNumber
26 | range_NeighDiff_shell1_MendeleevNumber
27 | mean_NeighDiff_shell1_AtomicWeight
28 | var_NeighDiff_shell1_AtomicWeight
29 | min_NeighDiff_shell1_AtomicWeight
30 | max_NeighDiff_shell1_AtomicWeight
31 | range_NeighDiff_shell1_AtomicWeight
32 | mean_NeighDiff_shell1_MeltingT
33 | var_NeighDiff_shell1_MeltingT
34 | min_NeighDiff_shell1_MeltingT
35 | max_NeighDiff_shell1_MeltingT
36 | range_NeighDiff_shell1_MeltingT
37 | mean_NeighDiff_shell1_Column
38 | var_NeighDiff_shell1_Column
39 | min_NeighDiff_shell1_Column
40 | max_NeighDiff_shell1_Column
41 | range_NeighDiff_shell1_Column
42 | mean_NeighDiff_shell1_Row
43 | var_NeighDiff_shell1_Row
44 | min_NeighDiff_shell1_Row
45 | max_NeighDiff_shell1_Row
46 | range_NeighDiff_shell1_Row
47 | mean_NeighDiff_shell1_CovalentRadius
48 | var_NeighDiff_shell1_CovalentRadius
49 | min_NeighDiff_shell1_CovalentRadius
50 | max_NeighDiff_shell1_CovalentRadius
51 | range_NeighDiff_shell1_CovalentRadius
52 | mean_NeighDiff_shell1_Electronegativity
53 | var_NeighDiff_shell1_Electronegativity
54 | min_NeighDiff_shell1_Electronegativity
55 | max_NeighDiff_shell1_Electronegativity
56 | range_NeighDiff_shell1_Electronegativity
57 | mean_NeighDiff_shell1_NsValence
58 | var_NeighDiff_shell1_NsValence
59 | min_NeighDiff_shell1_NsValence
60 | max_NeighDiff_shell1_NsValence
61 | range_NeighDiff_shell1_NsValence
62 | mean_NeighDiff_shell1_NpValence
63 | var_NeighDiff_shell1_NpValence
64 | min_NeighDiff_shell1_NpValence
65 | max_NeighDiff_shell1_NpValence
66 | range_NeighDiff_shell1_NpValence
67 | mean_NeighDiff_shell1_NdValence
68 | var_NeighDiff_shell1_NdValence
69 | min_NeighDiff_shell1_NdValence
70 | max_NeighDiff_shell1_NdValence
71 | range_NeighDiff_shell1_NdValence
72 | mean_NeighDiff_shell1_NfValence
73 | var_NeighDiff_shell1_NfValence
74 | min_NeighDiff_shell1_NfValence
75 | max_NeighDiff_shell1_NfValence
76 | range_NeighDiff_shell1_NfValence
77 | mean_NeighDiff_shell1_NValance
78 | var_NeighDiff_shell1_NValance
79 | min_NeighDiff_shell1_NValance
80 | max_NeighDiff_shell1_NValance
81 | range_NeighDiff_shell1_NValance
82 | mean_NeighDiff_shell1_NsUnfilled
83 | var_NeighDiff_shell1_NsUnfilled
84 | min_NeighDiff_shell1_NsUnfilled
85 | max_NeighDiff_shell1_NsUnfilled
86 | range_NeighDiff_shell1_NsUnfilled
87 | mean_NeighDiff_shell1_NpUnfilled
88 | var_NeighDiff_shell1_NpUnfilled
89 | min_NeighDiff_shell1_NpUnfilled
90 | max_NeighDiff_shell1_NpUnfilled
91 | range_NeighDiff_shell1_NpUnfilled
92 | mean_NeighDiff_shell1_NdUnfilled
93 | var_NeighDiff_shell1_NdUnfilled
94 | min_NeighDiff_shell1_NdUnfilled
95 | max_NeighDiff_shell1_NdUnfilled
96 | range_NeighDiff_shell1_NdUnfilled
97 | mean_NeighDiff_shell1_NfUnfilled
98 | var_NeighDiff_shell1_NfUnfilled
99 | min_NeighDiff_shell1_NfUnfilled
100 | max_NeighDiff_shell1_NfUnfilled
101 | range_NeighDiff_shell1_NfUnfilled
102 | mean_NeighDiff_shell1_NUnfilled
103 | var_NeighDiff_shell1_NUnfilled
104 | min_NeighDiff_shell1_NUnfilled
105 | max_NeighDiff_shell1_NUnfilled
106 | range_NeighDiff_shell1_NUnfilled
107 | mean_NeighDiff_shell1_GSvolume_pa
108 | var_NeighDiff_shell1_GSvolume_pa
109 | min_NeighDiff_shell1_GSvolume_pa
110 | max_NeighDiff_shell1_GSvolume_pa
111 | range_NeighDiff_shell1_GSvolume_pa
112 | mean_NeighDiff_shell1_GSbandgap
113 | var_NeighDiff_shell1_GSbandgap
114 | min_NeighDiff_shell1_GSbandgap
115 | max_NeighDiff_shell1_GSbandgap
116 | range_NeighDiff_shell1_GSbandgap
117 | mean_NeighDiff_shell1_GSmagmom
118 | var_NeighDiff_shell1_GSmagmom
119 | min_NeighDiff_shell1_GSmagmom
120 | max_NeighDiff_shell1_GSmagmom
121 | range_NeighDiff_shell1_GSmagmom
122 | mean_NeighDiff_shell1_SpaceGroupNumber
123 | var_NeighDiff_shell1_SpaceGroupNumber
124 | min_NeighDiff_shell1_SpaceGroupNumber
125 | max_NeighDiff_shell1_SpaceGroupNumber
126 | range_NeighDiff_shell1_SpaceGroupNumber
127 | NComp
128 | Comp_L2Norm
129 | Comp_L3Norm
130 | Comp_L5Norm
131 | Comp_L7Norm
132 | Comp_L10Norm
133 | mean_Number
134 | maxdiff_Number
135 | dev_Number
136 | max_Number
137 | min_Number
138 | most_Number
139 | mean_MendeleevNumber
140 | maxdiff_MendeleevNumber
141 | dev_MendeleevNumber
142 | max_MendeleevNumber
143 | min_MendeleevNumber
144 | most_MendeleevNumber
145 | mean_AtomicWeight
146 | maxdiff_AtomicWeight
147 | dev_AtomicWeight
148 | max_AtomicWeight
149 | min_AtomicWeight
150 | most_AtomicWeight
151 | mean_MeltingT
152 | maxdiff_MeltingT
153 | dev_MeltingT
154 | max_MeltingT
155 | min_MeltingT
156 | most_MeltingT
157 | mean_Column
158 | maxdiff_Column
159 | dev_Column
160 | max_Column
161 | min_Column
162 | most_Column
163 | mean_Row
164 | maxdiff_Row
165 | dev_Row
166 | max_Row
167 | min_Row
168 | most_Row
169 | mean_CovalentRadius
170 | maxdiff_CovalentRadius
171 | dev_CovalentRadius
172 | max_CovalentRadius
173 | min_CovalentRadius
174 | most_CovalentRadius
175 | mean_Electronegativity
176 | maxdiff_Electronegativity
177 | dev_Electronegativity
178 | max_Electronegativity
179 | min_Electronegativity
180 | most_Electronegativity
181 | mean_NsValence
182 | maxdiff_NsValence
183 | dev_NsValence
184 | max_NsValence
185 | min_NsValence
186 | most_NsValence
187 | mean_NpValence
188 | maxdiff_NpValence
189 | dev_NpValence
190 | max_NpValence
191 | min_NpValence
192 | most_NpValence
193 | mean_NdValence
194 | maxdiff_NdValence
195 | dev_NdValence
196 | max_NdValence
197 | min_NdValence
198 | most_NdValence
199 | mean_NfValence
200 | maxdiff_NfValence
201 | dev_NfValence
202 | max_NfValence
203 | min_NfValence
204 | most_NfValence
205 | mean_NValance
206 | maxdiff_NValance
207 | dev_NValance
208 | max_NValance
209 | min_NValance
210 | most_NValance
211 | mean_NsUnfilled
212 | maxdiff_NsUnfilled
213 | dev_NsUnfilled
214 | max_NsUnfilled
215 | min_NsUnfilled
216 | most_NsUnfilled
217 | mean_NpUnfilled
218 | maxdiff_NpUnfilled
219 | dev_NpUnfilled
220 | max_NpUnfilled
221 | min_NpUnfilled
222 | most_NpUnfilled
223 | mean_NdUnfilled
224 | maxdiff_NdUnfilled
225 | dev_NdUnfilled
226 | max_NdUnfilled
227 | min_NdUnfilled
228 | most_NdUnfilled
229 | mean_NfUnfilled
230 | maxdiff_NfUnfilled
231 | dev_NfUnfilled
232 | max_NfUnfilled
233 | min_NfUnfilled
234 | most_NfUnfilled
235 | mean_NUnfilled
236 | maxdiff_NUnfilled
237 | dev_NUnfilled
238 | max_NUnfilled
239 | min_NUnfilled
240 | most_NUnfilled
241 | mean_GSvolume_pa
242 | maxdiff_GSvolume_pa
243 | dev_GSvolume_pa
244 | max_GSvolume_pa
245 | min_GSvolume_pa
246 | most_GSvolume_pa
247 | mean_GSbandgap
248 | maxdiff_GSbandgap
249 | dev_GSbandgap
250 | max_GSbandgap
251 | min_GSbandgap
252 | most_GSbandgap
253 | mean_GSmagmom
254 | maxdiff_GSmagmom
255 | dev_GSmagmom
256 | max_GSmagmom
257 | min_GSmagmom
258 | most_GSmagmom
259 | mean_SpaceGroupNumber
260 | maxdiff_SpaceGroupNumber
261 | dev_SpaceGroupNumber
262 | max_SpaceGroupNumber
263 | min_SpaceGroupNumber
264 | most_SpaceGroupNumber
265 | frac_sValence
266 | frac_pValence
267 | frac_dValence
268 | frac_fValence
269 | CanFormIonic
270 | MaxIonicChar
271 | MeanIonicChar
272 |
--------------------------------------------------------------------------------
/pysipfenn/descriptorDefinitions/property_names_Ward2017KS2022.txt:
--------------------------------------------------------------------------------
1 | Abbreviation
2 | AtomicVolume
3 | AtomicWeight
4 | BoilingTemp
5 | BulkModulus
6 | Column
7 | CovalentRadius
8 | Density
9 | DipolePolarizability
10 | ElectronAffinity
11 | Electronegativity
12 | FirstIonizationEnergy
13 | FusionEnthalpy
14 | GSbandgap
15 | GSenergy_pa
16 | GSestBCClatcnt
17 | GSestFCClatcnt
18 | GSmagmom
19 | GSvolume_pa
20 | HHIp
21 | HHIr
22 | HeatCapacityMass
23 | HeatCapacityMolar
24 | HeatFusion
25 | ICSDVolume
26 | IonizationEnergies
27 | IsAlkali
28 | IsDBlock
29 | IsFBlock
30 | IsMetal
31 | IsMetalloid
32 | IsNonmetal
33 | MeltingT
34 | MendeleevNumber
35 | MiracleRadius
36 | NUnfilled
37 | NValance
38 | NdUnfilled
39 | NdValence
40 | NfUnfilled
41 | NfValence
42 | NpUnfilled
43 | NpValence
44 | NsUnfilled
45 | NsValence
46 | Number
47 | OxidationStates
48 | Polarizability
49 | Row
50 | ShearModulus
51 | SpaceGroupNumber
52 | ZungerPP-r_d
53 | ZungerPP-r_p
54 | ZungerPP-r_pi
55 | ZungerPP-r_s
56 | ZungerPP-r_sigma
57 | n_ws^third
58 | phi
59 |
--------------------------------------------------------------------------------
/pysipfenn/misc/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/pysipfenn/misc/__init__.py
--------------------------------------------------------------------------------
/pysipfenn/misc/conveniences.py:
--------------------------------------------------------------------------------
1 | from importlib.resources import files
2 |
3 | def patchPymatgenForExoticElements(
4 | x: bool = True,
5 | iupacOrder: bool = True
6 | ) -> None:
7 | """Patches pymatgen's ``core/periodic_table.json`` with (selectable) electronegativities and IUPAC ordering values
8 | needed to correctly handle some exotic chemical elements. The IUPAC rules are followed exactly per Table VI in the
9 | same reference. The electronegativity values are `not` Pauling ones but based on Oganov 2021 and are meant to be
10 | used primarily for providing trend information for ML model deployment (has to be included in training).
11 |
12 | Args:
13 | x: Patch electronegativities.
14 | iupacOrder: Patch IUPAC ordering of elements in chemical formulas so that they can be handled at all.
15 |
16 | Returns:
17 | None. The ``core/periodic_table.json`` file in local install of ``pymatgen`` is patched. Reinstall or upgrade
18 | of ``pymatgen`` reverses the changes.
19 |
20 | """
21 |
22 | patchIUPAC = {
23 | 'Rf': 49.5,
24 | 'Db': 52.5,
25 | 'Sg': 55.5,
26 | 'Bh': 58.5,
27 | 'Hs': 61.5,
28 | 'Mt': 64.5,
29 | 'Ds': 67.5,
30 | 'Rg': 70.5,
31 | 'Cn': 73.5,
32 | 'Nh': 76.5,
33 | 'Fl': 81.5,
34 | 'Mc': 87.5,
35 | 'Lv': 92.5,
36 | 'Ts': 97.5,
37 | 'Og': -0.5
38 | }
39 |
40 | patchX = {
41 | 'Ar': 3.57,
42 | 'He': 4.42,
43 | 'Ne': 4.44,
44 | 'Rf': 2.27,
45 | 'Db': 2.38,
46 | 'Sg': 2.51,
47 | 'Bh': 2.48,
48 | 'Hs': 2.52,
49 | 'Mt': 2.66,
50 | 'Ds': 2.73,
51 | 'Rg': 2.83,
52 | 'Cn': 3.03,
53 | 'Nh': 2.49,
54 | 'Fl': 2.57,
55 | 'Mc': 2.21,
56 | 'Lv': 2.42,
57 | 'Ts': 2.61,
58 | 'Og': 2.59
59 | }
60 |
61 | with files("pymatgen").joinpath("core/periodic_table.json").open() as f:
62 | pt = json.load(f)
63 |
64 | # Patch periodic table
65 | with files("pymatgen").joinpath("core/periodic_table.json").open("w") as f:
66 | if x:
67 | for el in patchX:
68 | pt[el]["X"] = patchX[el]
69 | if iupacOrder:
70 | for el in patchIUPAC:
71 | pt[el]["IUPAC ordering"] = patchIUPAC[el]
72 | json.dump(pt, f)
--------------------------------------------------------------------------------
/pysipfenn/misc/prototypeLibrary.yaml:
--------------------------------------------------------------------------------
1 | - name: FCC
2 | origin: https://www.oqmd.org/materials/prototype/A1_Cu
3 | POSCAR: |
4 | A1_Cu
5 | 1.0
6 | 0.00000 1.80750 1.80750
7 | 1.80750 0.00000 1.80750
8 | 1.80750 1.80750 0.00000
9 | Cu
10 | 1
11 | Direct
12 | 0.00000 0.00000 0.00000
13 | - name: BCC
14 | origin: https://www.oqmd.org/materials/prototype/A2_W
15 | POSCAR: |
16 | W
17 | 1.0
18 | -1.58250 1.58250 1.58250
19 | 1.58250 -1.58250 1.58250
20 | 1.58250 1.58250 -1.58250
21 | W
22 | 1
23 | Direct
24 | 0.00000 0.00000 0.00000
25 | - name: HCP
26 | origin: https://www.oqmd.org/materials/prototype/A3_Mg
27 | POSCAR: |
28 | Mg
29 | 1.0
30 | 3.20900 0.00000 0.00000
31 | -1.60450 2.77907 0.00000
32 | 0.00000 0.00000 5.21100
33 | Mg
34 | 2
35 | Direct
36 | 0.33333 0.66667 0.25000
37 | 0.66667 0.33333 0.75000
38 | - name: Diamond
39 | origin: https://www.oqmd.org/materials/prototype/C(cF8)
40 | POSCAR: |
41 | Si
42 | 1.0
43 | 0.000000 2.732954 2.732954
44 | 2.732954 0.000000 2.732954
45 | 2.732954 2.732954 0.000000
46 | Si
47 | 2
48 | Direct
49 | 0.500000 0.500000 0.500000
50 | 0.750000 0.750000 0.750000
51 | - name: DHCP
52 | origin: https://www.oqmd.org/materials/prototype/La
53 | POSCAR: |
54 | Nd
55 | 1.0
56 | 3.68789 0.00000 0.00000
57 | -1.84394 3.19380 0.00000
58 | 0.00000 0.00000 11.88128
59 | Nd
60 | 4
61 | Direct
62 | 0.00000 0.00000 0.00000
63 | 0.33333 0.66667 0.25000
64 | 0.00000 0.00000 0.50000
65 | 0.66667 0.33333 0.75000
66 | - name: Sn_A5
67 | origin: https://www.oqmd.org/materials/prototype/A5_Sn
68 | POSCAR: |
69 | Sn
70 | 1.0
71 | -2.91550 2.91550 1.59100
72 | 2.91550 -2.91550 1.59100
73 | 2.91550 2.91550 -1.59100
74 | Sn
75 | 2
76 | Direct
77 | 0.00000 0.00000 0.00000
78 | 0.75000 0.25000 0.50000
79 | - name: SC
80 | origin: http://crystallography.net/cod/1512532.html
81 | POSCAR: |
82 | Po1
83 | 1.0
84 | 3.345000 0.000000 0.000000
85 | 0.000000 3.345000 0.000000
86 | 0.000000 0.000000 3.345000
87 | Po
88 | 1
89 | direct
90 | 0.000000 0.000000 0.000000
--------------------------------------------------------------------------------
/pysipfenn/modelsSIPFENN/README.md:
--------------------------------------------------------------------------------
1 | # pySIPFENN Models Directory
2 | This is the default folder in which pySIPFENN **models** are defined in `models.json` and placed after installation.
3 | Please refer to the documentation page for details.
--------------------------------------------------------------------------------
/pysipfenn/modelsSIPFENN/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/pysipfenn/modelsSIPFENN/__init__.py
--------------------------------------------------------------------------------
/pysipfenn/modelsSIPFENN/models.json:
--------------------------------------------------------------------------------
1 | {
2 | "SIPFENN_Krajewski2020_NN9": {
3 | "name": "SIPFENN_Krajewski2020 Standard Materials Model",
4 | "URLjson": "https://zenodo.org/record/4279640/files/SIPFENN_Krajewski2020_NN9.json",
5 | "URLparams": "https://zenodo.org/record/4279640/files/SIPFENN_Krajewski2020_NN9.params",
6 | "URL_ONNX": "https://zenodo.org/record/7373089/files/SIPFENN_Krajewski2020_NN9.onnx",
7 | "descriptor": "Ward2017"
8 | },
9 | "SIPFENN_Krajewski2020_NN20": {
10 | "name": "SIPFENN_Krajewski2020 Novel Materials Model",
11 | "URLjson": "https://zenodo.org/record/4279640/files/SIPFENN_Krajewski2020_NN20.json",
12 | "URLparams": "https://zenodo.org/record/4279640/files/SIPFENN_Krajewski2020_NN20.params",
13 | "URL_ONNX": "https://zenodo.org/record/7373089/files/SIPFENN_Krajewski2020_NN20.onnx",
14 | "descriptor": "Ward2017"
15 | },
16 | "SIPFENN_Krajewski2020_NN24": {
17 | "name": "SIPFENN_Krajewski2020 Light Model",
18 | "URLjson": "https://zenodo.org/record/4279640/files/SIPFENN_Krajewski2020_NN24.json",
19 | "URLparams": "https://zenodo.org/record/4279640/files/SIPFENN_Krajewski2020_NN24.params",
20 | "URL_ONNX": "https://zenodo.org/record/7373089/files/SIPFENN_Krajewski2020_NN24.onnx",
21 | "descriptor": "Ward2017"
22 | },
23 | "SIPFENN_Krajewski2022_NN30": {
24 | "name": "SIPFENN_Krajewski2022 KS2022 Novel Materials Model",
25 | "URL_ONNX": "https://zenodo.org/record/7373089/files/SIPFENN_Krajewski2022_NN30.onnx",
26 | "descriptor": "KS2022"
27 | }
28 | }
--------------------------------------------------------------------------------
/pysipfenn/tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/pysipfenn/tests/__init__.py
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/AdjusterTestDescriptors.npy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/pysipfenn/tests/testCaseFiles/AdjusterTestDescriptors.npy
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/AdjusterTestTargets.csv:
--------------------------------------------------------------------------------
1 | Name, E_f [eV/atom]
2 | 1,0.11204700625000008
3 | 2,4.0003046025
4 | 3,-0.2837863701674114
5 | 4,-0.3390229200000003
6 | 5,-0.17997961958333317
7 | 6,-0.0791259005555555
8 | 7,0.004546606250000214
9 | 8,-0.3278120625000002
10 | 9,4.4154639174999994
11 | 10,-0.9682736355555556
12 | 11,-0.16495270666666784
13 | 12,3.4404967875000008
14 | 13,0.989534965
15 | 14,-0.17180871000000053
16 | 15,0.24268204250000025
17 | 16,3.2851498774999985
18 | 17,0.4826709725520833
19 | 18,0.8575663433333327
20 | 19,-0.15532792000000128
21 | 20,3.5336190875
22 | 21,3.4123461724999995
23 | 22,-0.08306756583333315
24 | 23,3.6542583874999996
25 | 24,-0.26425716500000157
26 | 25,0.0352760779999997
27 | 26,-0.19337707321428713
28 | 27,-0.6388277630555544
29 | 28,-0.5461846583333335
30 | 29,-0.7075618358333339
31 | 30,-0.5300890800000015
32 | 31,0.17000970687500017
33 | 32,0.035313649999999086
34 | 33,3.5496084325000012
35 | 34,-0.11673426059523706
36 | 35,-0.21550866821428574
37 | 36,-0.14759064909598255
38 | 37,-0.12148937464285682
39 | 38,-0.22380490500000047
40 | 39,-0.1422538353571444
41 | 40,0.07023631500000072
42 | 41,0.18032264750000015
43 | 42,-0.36177632333333304
44 | 43,-0.131107012857143
45 | 44,-0.2944636875000004
46 | 45,-0.17348738892857188
47 | 46,-0.3059225313095238
48 | 47,-0.6188369750000007
49 | 48,1.1871788166666672
50 | 49,-0.1811493189285715
51 | 50,3.1963209299999997
52 | 51,0.005689999999998936
53 | 52,-0.6340091025000003
54 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/AdjusterTestTargets.npy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PhasesResearchLab/pySIPFENN/126c6673f9061bae1f1dc32e8430027d0a2263d1/pysipfenn/tests/testCaseFiles/AdjusterTestTargets.npy
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/TestFile_DescriptorData_4_KS2022_labeled_enumerated.csv:
--------------------------------------------------------------------------------
1 | Name,mean_EffectiveCoordination,var_EffectiveCoordination,min_EffectiveCoordination,max_EffectiveCoordination,var_MeanBondLength,min_MeanBondLength,max_MeanBondLength,mean_BondLengthVariation,var_BondLengthVariation,min_BondLengthVariation,max_BondLengthVariation,var_CellVolume,MaxPackingEfficiency,mean_NeighDiff_shell1_Number,var_NeighDiff_shell1_Number,min_NeighDiff_shell1_Number,max_NeighDiff_shell1_Number,range_NeighDiff_shell1_Number,mean_NeighDiff_shell1_MendeleevNumber,var_NeighDiff_shell1_MendeleevNumber,min_NeighDiff_shell1_MendeleevNumber,max_NeighDiff_shell1_MendeleevNumber,range_NeighDiff_shell1_MendeleevNumber,mean_NeighDiff_shell1_AtomicWeight,var_NeighDiff_shell1_AtomicWeight,min_NeighDiff_shell1_AtomicWeight,max_NeighDiff_shell1_AtomicWeight,range_NeighDiff_shell1_AtomicWeight,mean_NeighDiff_shell1_MeltingT,var_NeighDiff_shell1_MeltingT,min_NeighDiff_shell1_MeltingT,max_NeighDiff_shell1_MeltingT,range_NeighDiff_shell1_MeltingT,mean_NeighDiff_shell1_Column,var_NeighDiff_shell1_Column,min_NeighDiff_shell1_Column,max_NeighDiff_shell1_Column,range_NeighDiff_shell1_Column,mean_NeighDiff_shell1_Row,var_NeighDiff_shell1_Row,min_NeighDiff_shell1_Row,max_NeighDiff_shell1_Row,range_NeighDiff_shell1_Row,mean_NeighDiff_shell1_CovalentRadius,var_NeighDiff_shell1_CovalentRadius,min_NeighDiff_shell1_CovalentRadius,max_NeighDiff_shell1_CovalentRadius,range_NeighDiff_shell1_CovalentRadius,mean_NeighDiff_shell1_Electronegativity,var_NeighDiff_shell1_Electronegativity,min_NeighDiff_shell1_Electronegativity,max_NeighDiff_shell1_Electronegativity,range_NeighDiff_shell1_Electronegativity,mean_NeighDiff_shell1_NsValence,var_NeighDiff_shell1_NsValence,min_NeighDiff_shell1_NsValence,max_NeighDiff_shell1_NsValence,range_NeighDiff_shell1_NsValence,mean_NeighDiff_shell1_NpValence,var_NeighDiff_shell1_NpValence,min_NeighDiff_shell1_NpValence,max_NeighDiff_shell1_NpValence,range_NeighDiff_shell1_NpValence,mean_NeighDiff_shell1_NdValence,var_NeighDiff_shell1_NdValence,min_NeighDiff_shell1_NdValence,max_NeighDiff_shell1_NdValence,range_NeighDiff_shell1_NdValence,mean_NeighDiff_shell1_NfValence,var_NeighDiff_shell1_NfValence,min_NeighDiff_shell1_NfValence,max_NeighDiff_shell1_NfValence,range_NeighDiff_shell1_NfValence,mean_NeighDiff_shell1_NValance,var_NeighDiff_shell1_NValance,min_NeighDiff_shell1_NValance,max_NeighDiff_shell1_NValance,range_NeighDiff_shell1_NValance,mean_NeighDiff_shell1_NsUnfilled,var_NeighDiff_shell1_NsUnfilled,min_NeighDiff_shell1_NsUnfilled,max_NeighDiff_shell1_NsUnfilled,range_NeighDiff_shell1_NsUnfilled,mean_NeighDiff_shell1_NpUnfilled,var_NeighDiff_shell1_NpUnfilled,min_NeighDiff_shell1_NpUnfilled,max_NeighDiff_shell1_NpUnfilled,range_NeighDiff_shell1_NpUnfilled,mean_NeighDiff_shell1_NdUnfilled,var_NeighDiff_shell1_NdUnfilled,min_NeighDiff_shell1_NdUnfilled,max_NeighDiff_shell1_NdUnfilled,range_NeighDiff_shell1_NdUnfilled,mean_NeighDiff_shell1_NfUnfilled,var_NeighDiff_shell1_NfUnfilled,min_NeighDiff_shell1_NfUnfilled,max_NeighDiff_shell1_NfUnfilled,range_NeighDiff_shell1_NfUnfilled,mean_NeighDiff_shell1_NUnfilled,var_NeighDiff_shell1_NUnfilled,min_NeighDiff_shell1_NUnfilled,max_NeighDiff_shell1_NUnfilled,range_NeighDiff_shell1_NUnfilled,mean_NeighDiff_shell1_GSvolume_pa,var_NeighDiff_shell1_GSvolume_pa,min_NeighDiff_shell1_GSvolume_pa,max_NeighDiff_shell1_GSvolume_pa,range_NeighDiff_shell1_GSvolume_pa,mean_NeighDiff_shell1_GSbandgap,var_NeighDiff_shell1_GSbandgap,min_NeighDiff_shell1_GSbandgap,max_NeighDiff_shell1_GSbandgap,range_NeighDiff_shell1_GSbandgap,mean_NeighDiff_shell1_GSmagmom,var_NeighDiff_shell1_GSmagmom,min_NeighDiff_shell1_GSmagmom,max_NeighDiff_shell1_GSmagmom,range_NeighDiff_shell1_GSmagmom,NComp,Comp_L2Norm,Comp_L3Norm,Comp_L5Norm,Comp_L7Norm,Comp_L10Norm,mean_Number,maxdiff_Number,dev_Number,max_Number,min_Number,most_Number,mean_MendeleevNumber,maxdiff_MendeleevNumber,dev_MendeleevNumber,max_MendeleevNumber,min_MendeleevNumber,most_MendeleevNumber,mean_AtomicWeight,maxdiff_AtomicWeight,dev_AtomicWeight,max_AtomicWeight,min_AtomicWeight,most_AtomicWeight,mean_MeltingT,maxdiff_MeltingT,dev_MeltingT,max_MeltingT,min_MeltingT,most_MeltingT,mean_Column,maxdiff_Column,dev_Column,max_Column,min_Column,most_Column,mean_Row,maxdiff_Row,dev_Row,max_Row,min_Row,most_Row,mean_CovalentRadius,maxdiff_CovalentRadius,dev_CovalentRadius,max_CovalentRadius,min_CovalentRadius,most_CovalentRadius,mean_Electronegativity,maxdiff_Electronegativity,dev_Electronegativity,max_Electronegativity,min_Electronegativity,most_Electronegativity,mean_NsValence,maxdiff_NsValence,dev_NsValence,max_NsValence,min_NsValence,most_NsValence,mean_NpValence,maxdiff_NpValence,dev_NpValence,max_NpValence,min_NpValence,most_NpValence,mean_NdValence,maxdiff_NdValence,dev_NdValence,max_NdValence,min_NdValence,most_NdValence,mean_NfValence,maxdiff_NfValence,dev_NfValence,max_NfValence,min_NfValence,most_NfValence,mean_NValance,maxdiff_NValance,dev_NValance,max_NValance,min_NValance,most_NValance,mean_NsUnfilled,maxdiff_NsUnfilled,dev_NsUnfilled,max_NsUnfilled,min_NsUnfilled,most_NsUnfilled,mean_NpUnfilled,maxdiff_NpUnfilled,dev_NpUnfilled,max_NpUnfilled,min_NpUnfilled,most_NpUnfilled,mean_NdUnfilled,maxdiff_NdUnfilled,dev_NdUnfilled,max_NdUnfilled,min_NdUnfilled,most_NdUnfilled,mean_NfUnfilled,maxdiff_NfUnfilled,dev_NfUnfilled,max_NfUnfilled,min_NfUnfilled,most_NfUnfilled,mean_NUnfilled,maxdiff_NUnfilled,dev_NUnfilled,max_NUnfilled,min_NUnfilled,most_NUnfilled,mean_GSvolume_pa,maxdiff_GSvolume_pa,dev_GSvolume_pa,max_GSvolume_pa,min_GSvolume_pa,most_GSvolume_pa,mean_GSbandgap,maxdiff_GSbandgap,dev_GSbandgap,max_GSbandgap,min_GSbandgap,most_GSbandgap,mean_GSmagmom,maxdiff_GSmagmom,dev_GSmagmom,max_GSmagmom,min_GSmagmom,most_GSmagmom,frac_sValence,frac_pValence,frac_dValence,frac_fValence,MaxIonicChar,MeanIonicChar
2 | 1,12.664179,0.56971496,11.79389,13.794477,0.016169308,0.9690569,1.0331813,0.05207893,0.014854466,0.027274305,0.0661337,0.03462427,0.57907194,1.4528041,0.55570066,0.937998,2.2760246,1.3380266,4.3584123,1.6671019,2.813994,6.828074,4.01408,2.5498185,0.9585304,1.6457334,3.8821392,2.2364058,197.71283,80.21021,127.49591,348.10696,220.61107,1.4528041,0.55570066,0.937998,2.2760246,1.3380266,0.0,0.0,0.0,0.0,0.0,5.330722,2.0557845,3.4006844,8.866066,5.465382,0.10135668,0.03725965,0.06539128,0.16566491,0.100273624,0.48049462,0.23167463,0.23803249,0.9148845,0.67685205,0.0,0.0,0.0,0.0,0.0,0.97230947,0.39372876,0.5780613,2.0379922,1.4599309,0.0,0.0,0.0,0.0,0.0,1.4528041,0.55570066,0.937998,2.2760246,1.3380266,0.48049462,0.23167463,0.23803249,0.9148845,0.67685205,0.0,0.0,0.0,0.0,0.0,0.97230947,0.39372876,0.5780613,2.0379922,1.4599309,0.0,0.0,0.0,0.0,0.0,1.4528041,0.55570066,0.937998,2.2760246,1.3380266,0.32184955,0.12226953,0.20777369,0.4784867,0.270713,0.0,0.0,0.0,0.0,0.0,1.1882187,0.30627933,0.8950421,1.739056,0.84401387,3.0,0.66999173,0.6191363,0.60213083,0.6002955,0.6000181,25.733334,4.0,0.92444444,28.0,24.0,26.0,54.2,12.0,2.7733333,61.0,49.0,55.0,55.198414,6.6973,1.7079004,58.6934,51.9961,55.845,1898.3334,452.0,150.22223,2180.0,1728.0,1811.0,7.733333,4.0,0.92444444,10.0,6.0,8.0,4.0,0.0,0.0,4.0,4.0,4.0,132.8,15.0,3.3066666,139.0,124.0,132.0,1.7953334,0.25,0.072177775,1.91,1.66,1.83,1.7333333,1.0,0.3911111,2.0,1.0,2.0,0.0,0.0,0.0,0.0,0.0,0.0,6.0,3.0,0.53333336,8.0,5.0,6.0,0.0,0.0,0.0,0.0,0.0,0.0,7.733333,4.0,0.92444444,10.0,6.0,8.0,0.26666668,1.0,0.3911111,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,4.0,3.0,0.53333336,5.0,2.0,4.0,0.0,0.0,0.0,0.0,0.0,0.0,4.266667,4.0,0.92444444,6.0,2.0,4.0,10.798,0.87,0.20906667,11.19,10.32,10.73,0.0,0.0,0.0,0.0,0.0,0.0,1.3457836,2.1106627,0.91785496,2.1106627,0.0,2.1106627,0.22413793,0.0,0.7758621,0.0,0.015503563,0.003661939
3 | 2,12.667662,0.5783594,11.788086,13.751698,0.016567057,0.97005844,1.0337728,0.051950518,0.014427774,0.02698211,0.06559518,0.035464365,0.5778989,1.522461,0.33364403,0.89767295,2.3938794,1.4962064,4.567383,1.0009321,2.693019,7.1816382,4.4886193,2.6343372,0.5411102,1.6197555,3.8540728,2.234317,196.4053,32.84896,134.81349,226.4694,91.655914,1.522461,0.33364403,0.89767295,2.3938794,1.4962064,0.0,0.0,0.0,0.0,0.0,5.6240287,1.3078263,3.2495728,9.13103,5.8814573,0.10282181,0.019314228,0.06660764,0.13575904,0.06915141,0.46581528,0.08281102,0.34111914,0.54654574,0.20542662,0.0,0.0,0.0,0.0,0.0,1.0566458,0.33179814,0.55655384,1.9493918,1.392838,0.0,0.0,0.0,0.0,0.0,1.522461,0.33364403,0.89767295,2.3938794,1.4962064,0.46581528,0.08281102,0.34111914,0.54654574,0.20542662,0.0,0.0,0.0,0.0,0.0,1.0566458,0.33179814,0.55655384,1.9493918,1.392838,0.0,0.0,0.0,0.0,0.0,1.522461,0.33364403,0.89767295,2.3938794,1.4962064,0.33539528,0.07163539,0.2010789,0.5129696,0.31189072,0.0,0.0,0.0,0.0,0.0,0.9079582,0.31824374,0.5567668,1.5046653,0.94789845,3.0,0.62893206,0.563224,0.53739536,0.53400546,0.5333883,25.333334,4.0,1.4222223,28.0,24.0,24.0,53.0,12.0,4.266667,61.0,49.0,49.0,54.361935,6.6973,2.5235555,58.6934,51.9961,51.9961,1991.2,452.0,201.38667,2180.0,1728.0,2180.0,7.3333335,4.0,1.4222223,10.0,6.0,6.0,4.0,0.0,0.0,4.0,4.0,4.0,134.13333,15.0,5.191111,139.0,124.0,139.0,1.7553333,0.25,0.10168889,1.91,1.66,1.66,1.4666667,1.0,0.4977778,2.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,5.866667,3.0,0.92444444,8.0,5.0,5.0,0.0,0.0,0.0,0.0,0.0,0.0,7.3333335,4.0,1.4222223,10.0,6.0,6.0,0.53333336,1.0,0.4977778,1.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,4.133333,3.0,0.92444444,5.0,2.0,5.0,0.0,0.0,0.0,0.0,0.0,0.0,4.6666665,4.0,1.4222223,6.0,2.0,6.0,10.893333,0.87,0.31644446,11.19,10.32,11.19,0.0,0.0,0.0,0.0,0.0,0.0,0.6819224,2.1106627,0.7619949,2.1106627,0.0,0.0,0.2,0.0,0.8,0.0,0.015503563,0.0055256616
4 | 3,12.606912,0.5670696,11.725152,13.564075,0.015211409,0.9720669,1.0296715,0.052631933,0.015126979,0.028640477,0.0676296,0.0318789,0.5960863,0.9637681,0.46323174,0.45324665,1.8323276,1.379081,2.8913045,1.3896952,1.35974,5.496983,4.137243,1.3725985,0.65973467,0.6455139,2.609601,1.9640871,39.996376,19.224117,18.809736,76.041595,57.23186,0.9637681,0.46323174,0.45324665,1.8323276,1.379081,0.0,0.0,0.0,0.0,0.0,3.8550725,1.852927,1.8129866,7.3293104,5.516324,0.038550727,0.01852927,0.018129867,0.073293105,0.05516324,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.9637681,0.46323174,0.45324665,1.8323276,1.379081,0.0,0.0,0.0,0.0,0.0,0.9637681,0.46323174,0.45324665,1.8323276,1.379081,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.9637681,0.46323174,0.45324665,1.8323276,1.379081,0.0,0.0,0.0,0.0,0.0,0.9637681,0.46323174,0.45324665,1.8323276,1.379081,0.19757247,0.09496251,0.092915565,0.37562716,0.2827116,0.0,0.0,0.0,0.0,0.0,0.73018354,0.35096014,0.3433951,1.3882338,1.0448387,2.0,0.7803133,0.74490374,0.73426354,0.7334214,0.73333627,27.466667,2.0,0.7822222,28.0,26.0,28.0,59.4,6.0,2.3466666,61.0,55.0,61.0,57.933826,2.8484,1.1140409,58.6934,55.845,58.6934,1750.1333,83.0,32.462223,1811.0,1728.0,1728.0,9.466666,2.0,0.7822222,10.0,8.0,10.0,4.0,0.0,0.0,4.0,4.0,4.0,126.13333,8.0,3.1288888,132.0,124.0,124.0,1.8886666,0.08,0.03128889,1.91,1.83,1.91,2.0,0.0,0.0,2.0,2.0,2.0,0.0,0.0,0.0,0.0,0.0,0.0,7.4666667,2.0,0.7822222,8.0,6.0,8.0,0.0,0.0,0.0,0.0,0.0,0.0,9.466666,2.0,0.7822222,10.0,8.0,10.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2.5333333,2.0,0.7822222,4.0,2.0,2.0,0.0,0.0,0.0,0.0,0.0,0.0,2.5333333,2.0,0.7822222,4.0,2.0,2.0,10.429334,0.41,0.16035555,10.73,10.32,10.32,0.0,0.0,0.0,0.0,0.0,0.0,0.9994662,1.5152681,0.5926382,2.1106627,0.5953947,0.5953947,0.2112676,0.0,0.7887324,0.0,0.0015987207,0.0006252774
5 | 4,12.6616955,0.5885467,11.726933,13.755252,0.016545385,0.97116697,1.0350103,0.05216379,0.014691252,0.024594534,0.065013215,0.035181664,0.56596506,1.0186791,0.18428722,0.63870484,1.3766797,0.7379749,3.0560374,0.5528617,1.9161144,4.130039,2.2139246,1.9603971,0.35465154,1.2291554,2.6493511,1.4201958,187.9463,34.00099,117.84104,253.9974,136.15637,1.0186791,0.18428722,0.63870484,1.3766797,0.7379749,0.0,0.0,0.0,0.0,0.0,3.5653772,0.6450053,2.235467,4.818379,2.582912,0.08658773,0.015664414,0.05428991,0.117017776,0.06272787,0.5093396,0.09214361,0.31935242,0.6883398,0.36898744,0.0,0.0,0.0,0.0,0.0,0.5093396,0.09214361,0.31935242,0.6883398,0.36898744,0.0,0.0,0.0,0.0,0.0,1.0186791,0.18428722,0.63870484,1.3766797,0.7379749,0.5093396,0.09214361,0.31935242,0.6883398,0.36898744,0.0,0.0,0.0,0.0,0.0,0.5093396,0.09214361,0.31935242,0.6883398,0.36898744,0.0,0.0,0.0,0.0,0.0,1.0186791,0.18428722,0.63870484,1.3766797,0.7379749,0.23429622,0.042386062,0.14690211,0.31663632,0.16973422,0.0,0.0,0.0,0.0,0.0,1.0750442,0.19448408,0.67404526,1.4528533,0.77880806,2.0,0.7211103,0.65421325,0.61503035,0.6048952,0.60103244,24.8,2.0,0.96,26.0,24.0,24.0,51.4,6.0,2.88,55.0,49.0,49.0,53.53566,3.8489,1.847472,55.845,51.9961,51.9961,2032.4,369.0,177.12,2180.0,1811.0,2180.0,6.8,2.0,0.96,8.0,6.0,6.0,4.0,0.0,0.0,4.0,4.0,4.0,136.2,7.0,3.36,139.0,132.0,139.0,1.728,0.17,0.0816,1.83,1.66,1.66,1.4,1.0,0.48,2.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,5.4,1.0,0.48,6.0,5.0,5.0,0.0,0.0,0.0,0.0,0.0,0.0,6.8,2.0,0.96,8.0,6.0,6.0,0.6,1.0,0.48,1.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,4.6,1.0,0.48,5.0,4.0,5.0,0.0,0.0,0.0,0.0,0.0,0.0,5.2,2.0,0.96,6.0,4.0,6.0,11.006,0.46,0.2208,11.19,10.73,11.19,0.0,0.0,0.0,0.0,0.0,0.0,0.8442651,2.1106627,1.0131181,2.1106627,0.0,0.0,0.20588236,0.0,0.7941176,0.0,0.0071989624,0.003455502
6 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/TestFile_DescriptorData_KS2022_randomSolution_valueRangesMeans.csv:
--------------------------------------------------------------------------------
1 | 0,11.956922
2 | 5.4845E-13,1.78364E-13
3 | 0,11.956922
4 | 0,11.956922
5 | 4.93266E-14,1.40795E-14
6 | 0,1
7 | 0,1
8 | 0,0.051981524
9 | 3.28969E-15,8.93664E-16
10 | 0,0.051981524
11 | 0,0.051981524
12 | 5.68129E-14,1.81415E-14
13 | 0,0.68017477
14 | 0.3870897,7.12652049
15 | 0.2899097,1.837693244
16 | 1.4187251,1.503641655
17 | 1.969989,13.9414315
18 | 2.687034,12.43778996
19 | 0.611908,9.53060188
20 | 0.2614777,2.284466884
21 | 2.618969,3.066401706
22 | 3.448019,20.47419864
23 | 4.07503,17.40779674
24 | 0.875219,15.87736112
25 | 0.634954,4.17719946
26 | 3.4312229,3.09477411
27 | 3.950918,31.22195464
28 | 5.636962,28.1271806
29 | 31.39746,497.090631
30 | 16.30954,117.7722932
31 | 125.92536,131.2679296
32 | 191.5083,1057.475323
33 | 236.76546,926.2073952
34 | 0.1834395,2.717744856
35 | 0.0802421,0.681151868
36 | 0.73133256,0.840033091
37 | 0.977671,6.09192841
38 | 1.1420163,5.251895358
39 | 0.03386527,0.459122396
40 | 0.02649208,0.16089159
41 | 0.07466975,0.006720277
42 | 0.0969989,0.981932798
43 | 0.1343337,0.975212524
44 | 0.5560754,6.78144089
45 | 0.2390648,1.877612342
46 | 1.47802996,1.58645044
47 | 2.037694,16.22205616
48 | 2.342977,14.63560574
49 | 0.00590287,0.141375248
50 | 0.003675785,0.028447453
51 | 0.036507761,0.035212654
52 | 0.03926406,0.259923003
53 | 0.06024842,0.224710346
54 | 0.04256493,0.380936394
55 | 0.01227298,0.204455063
56 | 0,0
57 | 0,1
58 | 0,1
59 | 0.03386527,0.459122396
60 | 0.02649208,0.16089159
61 | 0.07466975,0.006720277
62 | 0.0969989,0.981932798
63 | 0.1343337,0.975212524
64 | 0.20239,4.09579141
65 | 0.16311316,0.977560412
66 | 0.95498273,1.226774915
67 | 1.5223296,8.267676606
68 | 1.8360136,7.040901604
69 | 0,0
70 | 0,0
71 | 0,0
72 | 0,0
73 | 0,0
74 | 0.139879,3.453541334
75 | 0.11973184,0.729494118
76 | 0.94765933,1.074820572
77 | 1.0593047,6.670559944
78 | 1.6336153,5.59573941
79 | 0.04256493,0.380936394
80 | 0.01227298,0.204455063
81 | 0,0
82 | 0,1
83 | 0,1
84 | 0.1693264,2.295611978
85 | 0.1324603,0.804457947
86 | 0.37334874,0.033601387
87 | 0.4849944,4.909663886
88 | 0.6716685,4.876062508
89 | 0.1462688,2.07578746
90 | 0.07372314,0.531491133
91 | 0.56002307,0.326988845
92 | 0.798679,4.565558512
93 | 0.992677,4.238569714
94 | 0,0
95 | 0,0
96 | 0,0
97 | 0,0
98 | 0,0
99 | 0.1143462,1.799108396
100 | 0.0441769,0.500102094
101 | 0.4030011,0.366938569
102 | 0.6193281,4.01516943
103 | 0.7536616,3.64823086
104 | 0.187165,2.822845694
105 | 0.1357858,0.834206766
106 | 0.57286467,0.38234843
107 | 0.6499481,5.727070804
108 | 0.7513733,5.344722386
109 | 0,0
110 | 0,0
111 | 0,0
112 | 0,0
113 | 0,0
114 | 0.08364035,0.773743065
115 | 0.02746088,0.331854182
116 | 0.115505196,0.019976304
117 | 0.1378528,2.057713226
118 | 0.1600819,2.03773695
119 | 0,6
120 | 0.02158918,0.459222344
121 | 0.03288508,0.383836727
122 | 0.04213888,0.359973431
123 | 0.04385403,0.35796432
124 | 0.04415008,0.357751596
125 | 0.577753,21.8641378
126 | 0,16
127 | 0.401033,6.339413866
128 | 0,29
129 | 0,13
130 | 0,13
131 | 0.966626,62.98378654
132 | 0,24
133 | 0.408654,7.424505706
134 | 0,73
135 | 0,49
136 | 0,73
137 | 1.280416,46.77879226
138 | 0,36.56446
139 | 0.895185,14.15848442
140 | 0,63.546
141 | 0,26.981539
142 | 0,26.981539
143 | 51.3505,1469.79143
144 | 0,1246.53
145 | 18.80364,412.3796886
146 | 0,2180
147 | 0,933.47
148 | 0,933.47
149 | 0.284296,10.30351869
150 | 0,7
151 | 0.1146178,2.107594864
152 | 0,13
153 | 0,6
154 | 0,13
155 | 0.0441693,3.642256634
156 | 0,1
157 | 0.02584112,0.4593225
158 | 0,4
159 | 0,3
160 | 0,3
161 | 0.65975,127.1667527
162 | 0,18
163 | 0.378223,5.520421104
164 | 0,139
165 | 0,121
166 | 0,121
167 | 0.0115318,1.755211672
168 | 0,0.3
169 | 0.00296068,0.128206865
170 | 0,1.91
171 | 0,1.61
172 | 0,1.61
173 | 0.039237,1.743257468
174 | 0,1
175 | 0.03804427,0.381459904
176 | 0,2
177 | 0,1
178 | 0,2
179 | 0.04416913,0.357743385
180 | 0,1
181 | 0.02584112,0.4593225
182 | 0,1
183 | 0,0
184 | 0,1
185 | 0.2941426,4.625083994
186 | 0,10
187 | 0.2393346,3.307764096
188 | 0,10
189 | 0,0
190 | 0,0
191 | 0,0
192 | 0,0
193 | 0,0
194 | 0,0
195 | 0,0
196 | 0,0
197 | 0.2614398,6.726084862
198 | 0,8
199 | 0.1340166,2.85048759
200 | 0,11
201 | 0,3
202 | 0,3
203 | 0.03923698,0.256742528
204 | 0,1
205 | 0.03804427,0.381459904
206 | 0,1
207 | 0,0
208 | 0,0
209 | 0.2208457,1.788716936
210 | 0,5
211 | 0.1292055,2.296612498
212 | 0,5
213 | 0,0
214 | 0,5
215 | 0.2137315,1.79748213
216 | 0,5
217 | 0.0796188,1.748064026
218 | 0,5
219 | 0,0
220 | 0,0
221 | 0,0
222 | 0,0
223 | 0,0
224 | 0,0
225 | 0,0
226 | 0,0
227 | 0.1629317,3.842941588
228 | 0,5
229 | 0.1175019,1.419926944
230 | 0,6
231 | 0,1
232 | 0,5
233 | 0.2446755,12.77501871
234 | 0,6.235
235 | 0.1560111,2.649703098
236 | 0,16.48
237 | 0,10.245
238 | 0,16.48
239 | 0,0
240 | 0,0
241 | 0,0
242 | 0,0
243 | 0,0
244 | 0,0
245 | 0.0674975,0.547386102
246 | 0,2.1106627
247 | 0.05785012,0.672396997
248 | 0,2.1106627
249 | 0,0
250 | 0,0
251 | 0.013614,0.259207257
252 | 0.008346618,0.053205072
253 | 0.02080855,0.687587671
254 | 0,0
255 | 0,0.022248764
256 | 0.000330044,0.008516198
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/0-Cr8Fe18Ni4.POSCAR:
--------------------------------------------------------------------------------
1 | Cr8 Fe18 Ni4
2 | 1.0
3 | 8.547048 0.000000 0.000000
4 | 0.000000 8.547048 0.000000
5 | 0.000000 0.000000 4.477714
6 | Cr Fe Ni
7 | 8 18 4
8 | direct
9 | 0.737702 0.063709 0.000000 Cr
10 | 0.262298 0.936291 0.000000 Cr
11 | 0.436291 0.237702 0.500000 Cr
12 | 0.762298 0.563709 0.500000 Cr
13 | 0.563709 0.762298 0.500000 Cr
14 | 0.237702 0.436291 0.500000 Cr
15 | 0.063709 0.737702 0.000000 Cr
16 | 0.936291 0.262298 0.000000 Cr
17 | 0.000000 0.000000 0.000000 Fe
18 | 0.500000 0.500000 0.500000 Fe
19 | 0.463029 0.129472 0.000000 Fe
20 | 0.536971 0.870528 0.000000 Fe
21 | 0.370528 0.963029 0.500000 Fe
22 | 0.036971 0.629472 0.500000 Fe
23 | 0.629472 0.036971 0.500000 Fe
24 | 0.963029 0.370528 0.500000 Fe
25 | 0.129472 0.463029 0.000000 Fe
26 | 0.870528 0.536971 0.000000 Fe
27 | 0.182718 0.182718 0.251726 Fe
28 | 0.817282 0.817282 0.748274 Fe
29 | 0.817282 0.817282 0.251726 Fe
30 | 0.317282 0.682718 0.751726 Fe
31 | 0.317282 0.682718 0.248274 Fe
32 | 0.182718 0.182718 0.748274 Fe
33 | 0.682718 0.317282 0.248274 Fe
34 | 0.682718 0.317282 0.751726 Fe
35 | 0.399910 0.399910 0.000000 Ni
36 | 0.600090 0.600090 0.000000 Ni
37 | 0.100090 0.899910 0.500000 Ni
38 | 0.899910 0.100090 0.500000 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/1-Cr16Fe8Ni6.POSCAR:
--------------------------------------------------------------------------------
1 | Cr16 Fe8 Ni6
2 | 1.0
3 | 8.456674 0.000000 0.000000
4 | 0.000000 8.456674 0.000000
5 | 0.000000 0.000000 4.464884
6 | Cr Fe Ni
7 | 16 8 6
8 | direct
9 | 0.460924 0.128311 0.000000 Cr
10 | 0.539076 0.871689 0.000000 Cr
11 | 0.371689 0.960924 0.500000 Cr
12 | 0.039076 0.628311 0.500000 Cr
13 | 0.628311 0.039076 0.500000 Cr
14 | 0.960924 0.371689 0.500000 Cr
15 | 0.128311 0.460924 0.000000 Cr
16 | 0.871689 0.539076 0.000000 Cr
17 | 0.738132 0.064482 0.000000 Cr
18 | 0.261868 0.935518 0.000000 Cr
19 | 0.435518 0.238132 0.500000 Cr
20 | 0.761868 0.564482 0.500000 Cr
21 | 0.564482 0.761868 0.500000 Cr
22 | 0.238132 0.435518 0.500000 Cr
23 | 0.064482 0.738132 0.000000 Cr
24 | 0.935518 0.261868 0.000000 Cr
25 | 0.184510 0.184510 0.250963 Fe
26 | 0.815490 0.815490 0.749037 Fe
27 | 0.815490 0.815490 0.250963 Fe
28 | 0.315490 0.684510 0.750963 Fe
29 | 0.315490 0.684510 0.249037 Fe
30 | 0.184510 0.184510 0.749037 Fe
31 | 0.684510 0.315490 0.249037 Fe
32 | 0.684510 0.315490 0.750963 Fe
33 | 0.000000 0.000000 0.000000 Ni
34 | 0.500000 0.500000 0.500000 Ni
35 | 0.400440 0.400440 0.000000 Ni
36 | 0.599560 0.599560 0.000000 Ni
37 | 0.099560 0.900440 0.500000 Ni
38 | 0.900440 0.099560 0.500000 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/10-Ce4Ti4O12.POSCAR:
--------------------------------------------------------------------------------
1 | O Ce Ti
2 | 1.0
3 | 5.881254 0.000000 0.000000
4 | 0.000000 5.764571 0.000000
5 | 0.000000 0.000000 8.400368
6 | Ce O Ti
7 | 4 12 4
8 | direct
9 | 0.5000005101 0.0000000000 0.0000000000
10 | 0.0000000000 0.5000007806 0.0000000000
11 | 0.5000005101 0.0000000000 0.4999995238
12 | 0.0000000000 0.5000007806 0.4999995238
13 | 0.6431077454 0.3634598307 0.0871699906
14 | 0.8568920846 0.8634588766 0.0871699906
15 | 0.1814902060 0.3191096094 0.2499997619
16 | 0.3185103041 0.8191086553 0.2499997619
17 | 0.6431077454 0.3634598307 0.4128295332
18 | 0.8568920846 0.8634588766 0.4128295332
19 | 0.1431089356 0.1365409499 0.5871695145
20 | 0.3568915745 0.6365399958 0.5871695145
21 | 0.6814907161 0.1808911713 0.7500004762
22 | 0.8185091139 0.6808919519 0.7500004762
23 | 0.1431089356 0.1365409499 0.9128302474
24 | 0.3568915745 0.6365399958 0.9128302474
25 | 0.4710917094 0.4994369919 0.2499997619
26 | 0.0289088007 0.9994360378 0.2499997619
27 | 0.9710905191 0.0005637887 0.7500004762
28 | 0.5289076105 0.5005628346 0.7500004762
29 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/11-Fe10Ni20.POSCAR:
--------------------------------------------------------------------------------
1 | Fe10 Ni20
2 | 1.0
3 | 8.435896 0.000052 0.000020
4 | 0.000052 8.435783 0.000024
5 | 0.000009 0.000010 4.464818
6 | Fe Ni
7 | 10 20
8 | direct
9 | 0.000000 0.000000 0.000000 Fe
10 | 0.500000 0.500000 0.500000 Fe
11 | 0.183943 0.183947 0.251124 Fe
12 | 0.816057 0.816053 0.748876 Fe
13 | 0.816058 0.816054 0.251123 Fe
14 | 0.316065 0.683929 0.751142 Fe
15 | 0.316066 0.683930 0.248858 Fe
16 | 0.183942 0.183946 0.748877 Fe
17 | 0.683935 0.316071 0.248858 Fe
18 | 0.683934 0.316070 0.751142 Fe
19 | 0.401039 0.401049 0.000001 Ni
20 | 0.598961 0.598951 0.999999 Ni
21 | 0.098963 0.901025 0.500000 Ni
22 | 0.901037 0.098975 0.500000 Ni
23 | 0.461203 0.131612 0.000002 Ni
24 | 0.538797 0.868388 0.999998 Ni
25 | 0.368396 0.961214 0.499998 Ni
26 | 0.038785 0.631606 0.500003 Ni
27 | 0.631604 0.038786 0.500002 Ni
28 | 0.961215 0.368394 0.499997 Ni
29 | 0.131600 0.461209 0.000001 Ni
30 | 0.868400 0.538791 0.999999 Ni
31 | 0.736342 0.065398 0.000000 Ni
32 | 0.263658 0.934602 0.000000 Ni
33 | 0.434614 0.236344 0.500000 Ni
34 | 0.763666 0.565383 0.500000 Ni
35 | 0.565386 0.763656 0.500000 Ni
36 | 0.236334 0.434617 0.500000 Ni
37 | 0.065390 0.736329 0.000000 Ni
38 | 0.934610 0.263671 0.000000 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/12-Gd4Cr4O12.POSCAR:
--------------------------------------------------------------------------------
1 | Cr Gd O
2 | 1.0
3 | 5.307212 0.000000 0.000000
4 | 0.000000 5.585111 0.000000
5 | 0.000000 0.000000 7.625259
6 | Cr Gd O
7 | 4 4 12
8 | direct
9 | 0.5000007537 0.0000000000 0.0000000000
10 | 0.0000000000 0.5000008057 0.0000000000
11 | 0.5000007537 0.0000000000 0.5000000656
12 | 0.0000000000 0.5000008057 0.5000000656
13 | 0.9822991808 0.0657802504 0.2499993771
14 | 0.5177011960 0.5657792656 0.2499993771
15 | 0.4823003113 0.4342205553 0.7499994426
16 | 0.0177004423 0.9342195706 0.7499994426
17 | 0.6943513845 0.3016000935 0.0544466752
18 | 0.8056489924 0.8015991088 0.0544466752
19 | 0.1064193403 0.4646765302 0.2499993771
20 | 0.3935814134 0.9646773359 0.2499993771
21 | 0.6943513845 0.3016000935 0.4455533904
22 | 0.8056489924 0.8015991088 0.4455533904
23 | 0.1943525150 0.1984007122 0.5544467408
24 | 0.3056482387 0.6983997274 0.5544467408
25 | 0.6064200940 0.0353224851 0.7499994426
26 | 0.8935802828 0.5353232908 0.7499994426
27 | 0.1943525150 0.1984007122 0.9455534560
28 | 0.3056482387 0.6983997274 0.9455534560
29 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/13-Fe16Ni14.POSCAR:
--------------------------------------------------------------------------------
1 | Fe16 Ni14
2 | 1.0
3 | 8.506034 0.000072 -0.000032
4 | 0.000072 8.506034 0.000014
5 | -0.000016 0.000006 4.456634
6 | Fe Ni
7 | 16 14
8 | direct
9 | 0.182112 0.182121 0.251243 Fe
10 | 0.817888 0.817879 0.748757 Fe
11 | 0.817889 0.817879 0.251243 Fe
12 | 0.317870 0.682122 0.751232 Fe
13 | 0.317869 0.682122 0.248771 Fe
14 | 0.182111 0.182121 0.748757 Fe
15 | 0.682130 0.317878 0.248768 Fe
16 | 0.682131 0.317878 0.751229 Fe
17 | 0.462827 0.132712 0.000000 Fe
18 | 0.537173 0.867288 0.000000 Fe
19 | 0.367267 0.962835 0.500000 Fe
20 | 0.037164 0.632727 0.500001 Fe
21 | 0.632733 0.037165 0.500000 Fe
22 | 0.962836 0.367273 0.499999 Fe
23 | 0.132711 0.462829 0.999999 Fe
24 | 0.867289 0.537171 0.000001 Fe
25 | 0.000000 0.000000 0.000000 Ni
26 | 0.500000 0.500000 0.500000 Ni
27 | 0.399571 0.399584 0.999999 Ni
28 | 0.600429 0.600416 0.000001 Ni
29 | 0.100400 0.899593 0.499999 Ni
30 | 0.899600 0.100407 0.500001 Ni
31 | 0.737920 0.066698 0.999999 Ni
32 | 0.262080 0.933302 0.000001 Ni
33 | 0.433293 0.237895 0.500002 Ni
34 | 0.762108 0.566705 0.500001 Ni
35 | 0.566707 0.762105 0.499998 Ni
36 | 0.237892 0.433295 0.499999 Ni
37 | 0.066695 0.737918 0.000003 Ni
38 | 0.933305 0.262082 0.999997 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/14-Fe24Ni6.POSCAR:
--------------------------------------------------------------------------------
1 | Fe24 Ni6
2 | 1.0
3 | 8.521173 -0.000049 0.000001
4 | -0.000049 8.521030 0.000001
5 | 0.000000 0.000001 4.500142
6 | Fe Ni
7 | 24 6
8 | direct
9 | 0.183418 0.183419 0.250025 Fe
10 | 0.816582 0.816581 0.749975 Fe
11 | 0.816582 0.816581 0.250025 Fe
12 | 0.316545 0.683458 0.750051 Fe
13 | 0.316545 0.683458 0.249949 Fe
14 | 0.183418 0.183419 0.749975 Fe
15 | 0.683455 0.316542 0.249949 Fe
16 | 0.683455 0.316542 0.750051 Fe
17 | 0.463011 0.132154 0.000000 Fe
18 | 0.536989 0.867846 0.000000 Fe
19 | 0.367831 0.963011 0.500000 Fe
20 | 0.036990 0.632172 0.500000 Fe
21 | 0.632169 0.036989 0.500000 Fe
22 | 0.963010 0.367828 0.500000 Fe
23 | 0.132150 0.463013 0.000000 Fe
24 | 0.867850 0.536987 0.000000 Fe
25 | 0.737611 0.066134 0.000000 Fe
26 | 0.262389 0.933866 0.000000 Fe
27 | 0.433868 0.237572 0.500000 Fe
28 | 0.762422 0.566135 0.500000 Fe
29 | 0.566132 0.762428 0.500000 Fe
30 | 0.237578 0.433865 0.500000 Fe
31 | 0.066131 0.737605 0.000000 Fe
32 | 0.933869 0.262395 0.000000 Fe
33 | 0.000000 0.000000 0.000000 Ni
34 | 0.500000 0.500000 0.500000 Ni
35 | 0.398363 0.398366 0.000000 Ni
36 | 0.601637 0.601634 0.000000 Ni
37 | 0.101615 0.898388 0.500000 Ni
38 | 0.898385 0.101612 0.500000 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/15-Ta4Tl4O12.POSCAR:
--------------------------------------------------------------------------------
1 | Tl O Ta
2 | 1.0
3 | 5.699697 0.000000 0.000000
4 | 0.000000 5.741777 0.000000
5 | 0.000000 0.000000 8.081517
6 | O Ta Tl
7 | 12 4 4
8 | direct
9 | 0.2506185855 0.2500602165 0.0007164496
10 | 0.2493799232 0.7500604778 0.0007164496
11 | 0.9987688819 0.4992391728 0.2500000928
12 | 0.5012319076 0.9992394341 0.2500000928
13 | 0.2506185855 0.2500602165 0.4992837360
14 | 0.2493799232 0.7500604778 0.4992837360
15 | 0.7506188487 0.2499400447 0.5007153979
16 | 0.7493801864 0.7499403059 0.5007153979
17 | 0.4987686188 0.0007610884 0.7500002784
18 | 0.0012316444 0.5007613497 0.7500002784
19 | 0.7506188487 0.2499400447 0.9992839216
20 | 0.7493801864 0.7499403059 0.9992839216
21 | 0.5000002632 0.0000000000 0.0000000000
22 | 0.0000000000 0.5000002612 0.0000000000
23 | 0.5000002632 0.0000000000 0.5000001856
24 | 0.0000000000 0.5000002612 0.5000001856
25 | 0.0001438673 0.0000000000 0.2500000928
26 | 0.4998563959 0.4999549791 0.2500000928
27 | 0.9998566590 0.0000000000 0.7500002784
28 | 0.5001423760 0.5000455434 0.7500002784
29 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/16-Fe18Ni12.POSCAR:
--------------------------------------------------------------------------------
1 | Fe18 Ni12
2 | 1.0
3 | 8.542264 0.000064 -0.000007
4 | 0.000064 8.542246 0.000006
5 | -0.000003 0.000002 4.460775
6 | Fe Ni
7 | 18 12
8 | direct
9 | 0.000000 0.000000 0.000000 Fe
10 | 0.500000 0.500000 0.500000 Fe
11 | 0.182312 0.182290 0.250374 Fe
12 | 0.817688 0.817710 0.749626 Fe
13 | 0.817689 0.817709 0.250375 Fe
14 | 0.317717 0.682304 0.750394 Fe
15 | 0.317716 0.682305 0.249608 Fe
16 | 0.182311 0.182291 0.749625 Fe
17 | 0.682283 0.317696 0.249606 Fe
18 | 0.682284 0.317695 0.750392 Fe
19 | 0.463090 0.132746 0.000000 Fe
20 | 0.536910 0.867254 0.000000 Fe
21 | 0.367255 0.963097 0.500000 Fe
22 | 0.036910 0.632773 0.500000 Fe
23 | 0.632745 0.036903 0.500000 Fe
24 | 0.963090 0.367227 0.500000 Fe
25 | 0.132771 0.463084 0.000000 Fe
26 | 0.867229 0.536916 0.000000 Fe
27 | 0.399054 0.399045 0.000000 Ni
28 | 0.600946 0.600955 0.000000 Ni
29 | 0.100960 0.899050 0.500000 Ni
30 | 0.899040 0.100950 0.500000 Ni
31 | 0.737191 0.067685 0.000001 Ni
32 | 0.262809 0.932315 0.999999 Ni
33 | 0.432321 0.237186 0.499999 Ni
34 | 0.762800 0.567689 0.499999 Ni
35 | 0.567679 0.762814 0.500001 Ni
36 | 0.237200 0.432311 0.500001 Ni
37 | 0.067695 0.737207 0.999999 Ni
38 | 0.932305 0.262793 0.000001 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/17-Pr4Ga4O12.POSCAR:
--------------------------------------------------------------------------------
1 | Pr O Ga
2 | 1.0
3 | 5.684812 0.000000 0.000000
4 | 0.000000 5.628017 0.000000
5 | 0.000000 0.000000 8.678058
6 | Ga O Pr
7 | 4 12 4
8 | direct
9 | 0.4698202861 0.4865656945 0.2499994815
10 | 0.0301804176 0.9865677378 0.2499994815
11 | 0.9698192306 0.0134327952 0.7499995967
12 | 0.5301793621 0.5134330618 0.7499995967
13 | 0.6377167794 0.3635543389 0.0905167953
14 | 0.8622835724 0.8635546055 0.0905167953
15 | 0.1616007706 0.3038743486 0.2499994815
16 | 0.3383981739 0.8038746152 0.2499994815
17 | 0.6377167794 0.3635543389 0.4094833199
18 | 0.8622835724 0.8635546055 0.4094833199
19 | 0.1377178348 0.1364459276 0.5905169106
20 | 0.3622828688 0.6364461941 0.5905169106
21 | 0.6616014742 0.1961241411 0.7499995967
22 | 0.8383988776 0.6961244076 0.7499995967
23 | 0.1377178348 0.1364459276 0.9094834351
24 | 0.3622828688 0.6364461941 0.9094834351
25 | 0.5000007036 0.0000000000 0.0000000000
26 | 0.0000000000 0.5000002665 0.0000000000
27 | 0.5000007036 0.0000000000 0.5000001152
28 | 0.0000000000 0.5000002665 0.5000001152
29 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/18-Fe28Ni2.POSCAR:
--------------------------------------------------------------------------------
1 | Fe28 Ni2
2 | 1.0
3 | 8.709211 0.000067 -0.000001
4 | 0.000067 8.709156 -0.000001
5 | 0.000000 -0.000001 4.564567
6 | Fe Ni
7 | 28 2
8 | direct
9 | 0.183277 0.183304 0.250615 Fe
10 | 0.816723 0.816696 0.749385 Fe
11 | 0.816723 0.816696 0.250615 Fe
12 | 0.316706 0.683267 0.750614 Fe
13 | 0.316706 0.683267 0.249386 Fe
14 | 0.183277 0.183304 0.749385 Fe
15 | 0.683294 0.316733 0.249386 Fe
16 | 0.683294 0.316733 0.750614 Fe
17 | 0.397928 0.397953 0.000000 Fe
18 | 0.602072 0.602047 0.000000 Fe
19 | 0.102064 0.897908 0.500000 Fe
20 | 0.897936 0.102092 0.500000 Fe
21 | 0.463462 0.131127 0.000000 Fe
22 | 0.536538 0.868873 0.000000 Fe
23 | 0.368897 0.963465 0.500000 Fe
24 | 0.036527 0.631080 0.500000 Fe
25 | 0.631103 0.036535 0.500000 Fe
26 | 0.963473 0.368920 0.500000 Fe
27 | 0.131103 0.463471 0.000000 Fe
28 | 0.868897 0.536529 0.000000 Fe
29 | 0.738775 0.066043 0.000000 Fe
30 | 0.261225 0.933957 0.000000 Fe
31 | 0.433967 0.238790 0.500000 Fe
32 | 0.761235 0.566024 0.500000 Fe
33 | 0.566033 0.761210 0.500000 Fe
34 | 0.238765 0.433976 0.500000 Fe
35 | 0.066034 0.738749 0.000000 Fe
36 | 0.933966 0.261251 0.000000 Fe
37 | 0.000000 0.000000 0.000000 Ni
38 | 0.500000 0.500000 0.500000 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/19-Fe4Ni26.POSCAR:
--------------------------------------------------------------------------------
1 | Fe4 Ni26
2 | 1.0
3 | 8.378314 -0.000121 -0.000002
4 | -0.000121 8.378356 0.000000
5 | -0.000001 0.000000 4.468583
6 | Fe Ni
7 | 4 26
8 | direct
9 | 0.399346 0.399371 0.000000 Fe
10 | 0.600654 0.600629 0.000000 Fe
11 | 0.100629 0.899346 0.500000 Fe
12 | 0.899371 0.100654 0.500000 Fe
13 | 0.000000 0.000000 0.000000 Ni
14 | 0.500000 0.500000 0.500000 Ni
15 | 0.182141 0.182157 0.251308 Ni
16 | 0.817859 0.817843 0.748692 Ni
17 | 0.817859 0.817843 0.251309 Ni
18 | 0.317859 0.682129 0.751292 Ni
19 | 0.317859 0.682129 0.248708 Ni
20 | 0.182141 0.182157 0.748691 Ni
21 | 0.682141 0.317871 0.248708 Ni
22 | 0.682141 0.317871 0.751292 Ni
23 | 0.462816 0.134534 0.000000 Ni
24 | 0.537184 0.865466 0.000000 Ni
25 | 0.365476 0.962820 0.500000 Ni
26 | 0.037174 0.634508 0.500000 Ni
27 | 0.634524 0.037180 0.500000 Ni
28 | 0.962826 0.365492 0.500000 Ni
29 | 0.134526 0.462820 0.000000 Ni
30 | 0.865474 0.537180 0.000000 Ni
31 | 0.735229 0.065948 0.000000 Ni
32 | 0.264771 0.934052 0.000000 Ni
33 | 0.434063 0.235252 0.500000 Ni
34 | 0.764763 0.565932 0.500000 Ni
35 | 0.565937 0.764748 0.500000 Ni
36 | 0.235237 0.434068 0.500000 Ni
37 | 0.065941 0.735214 0.000000 Ni
38 | 0.934059 0.264786 0.000000 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/2-Fe8Ni22.POSCAR:
--------------------------------------------------------------------------------
1 | Fe8 Ni22
2 | 1.0
3 | 8.447587 0.000180 0.000077
4 | 0.000180 8.447554 0.000058
5 | 0.000033 0.000025 4.481166
6 | Fe Ni
7 | 8 22
8 | direct
9 | 0.734080 0.063878 0.000001 Fe
10 | 0.265920 0.936122 0.999999 Fe
11 | 0.436112 0.234113 0.500000 Fe
12 | 0.765885 0.563890 0.500000 Fe
13 | 0.563888 0.765887 0.500000 Fe
14 | 0.234115 0.436110 0.500000 Fe
15 | 0.063876 0.734078 0.000001 Fe
16 | 0.936124 0.265922 0.999999 Fe
17 | 0.000000 0.000000 0.000000 Ni
18 | 0.500000 0.500000 0.500000 Ni
19 | 0.182655 0.182655 0.250544 Ni
20 | 0.817345 0.817345 0.749456 Ni
21 | 0.817347 0.817348 0.250552 Ni
22 | 0.317377 0.682620 0.750537 Ni
23 | 0.317379 0.682622 0.249464 Ni
24 | 0.182653 0.182652 0.749448 Ni
25 | 0.682623 0.317380 0.249463 Ni
26 | 0.682621 0.317378 0.750536 Ni
27 | 0.402184 0.402178 0.000006 Ni
28 | 0.597816 0.597822 0.999994 Ni
29 | 0.097808 0.902190 0.500000 Ni
30 | 0.902192 0.097810 0.500000 Ni
31 | 0.462456 0.133295 0.000003 Ni
32 | 0.537544 0.866705 0.999997 Ni
33 | 0.366713 0.962482 0.499990 Ni
34 | 0.037521 0.633287 0.500008 Ni
35 | 0.633287 0.037518 0.500010 Ni
36 | 0.962479 0.366713 0.499992 Ni
37 | 0.133297 0.462458 0.000006 Ni
38 | 0.866703 0.537542 0.999994 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/20-Fe8Ni22.POSCAR:
--------------------------------------------------------------------------------
1 | Fe8 Ni22
2 | 1.0
3 | 8.481358 0.000073 0.000033
4 | 0.000073 8.481345 0.000042
5 | 0.000014 0.000018 4.512787
6 | Fe Ni
7 | 8 22
8 | direct
9 | 0.461737 0.135845 0.000000 Fe
10 | 0.538263 0.864155 0.000000 Fe
11 | 0.364143 0.961745 0.499999 Fe
12 | 0.038259 0.635862 0.500001 Fe
13 | 0.635857 0.038255 0.500001 Fe
14 | 0.961741 0.364138 0.499999 Fe
15 | 0.135840 0.461739 0.000000 Fe
16 | 0.864160 0.538261 0.000000 Fe
17 | 0.000000 0.000000 0.000000 Ni
18 | 0.500000 0.500000 0.500000 Ni
19 | 0.183147 0.183145 0.250095 Ni
20 | 0.816853 0.816855 0.749905 Ni
21 | 0.816854 0.816856 0.250097 Ni
22 | 0.316850 0.683148 0.750091 Ni
23 | 0.316852 0.683149 0.249908 Ni
24 | 0.183146 0.183144 0.749903 Ni
25 | 0.683150 0.316852 0.249909 Ni
26 | 0.683148 0.316851 0.750092 Ni
27 | 0.401704 0.401709 0.000003 Ni
28 | 0.598296 0.598291 0.999997 Ni
29 | 0.098289 0.901721 0.500000 Ni
30 | 0.901711 0.098279 0.500000 Ni
31 | 0.735278 0.064472 0.999998 Ni
32 | 0.264722 0.935528 0.000002 Ni
33 | 0.435512 0.235264 0.499999 Ni
34 | 0.764746 0.564486 0.500001 Ni
35 | 0.564488 0.764736 0.500001 Ni
36 | 0.235254 0.435514 0.499999 Ni
37 | 0.064474 0.735288 0.999998 Ni
38 | 0.935526 0.264712 0.000002 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/21-Fe10Ni20.POSCAR:
--------------------------------------------------------------------------------
1 | Fe10 Ni20
2 | 1.0
3 | 8.432300 0.000140 0.000010
4 | 0.000140 8.432328 0.000016
5 | 0.000000 0.000006 4.484123
6 | Fe Ni
7 | 10 20
8 | direct
9 | 0.000000 0.000000 0.000000 Fe
10 | 0.500000 0.500000 0.500000 Fe
11 | 0.461438 0.135110 0.000000 Fe
12 | 0.538562 0.864890 0.000000 Fe
13 | 0.364880 0.961429 0.499999 Fe
14 | 0.038570 0.635116 0.500001 Fe
15 | 0.635120 0.038571 0.500001 Fe
16 | 0.961430 0.364884 0.499999 Fe
17 | 0.135117 0.461436 0.000000 Fe
18 | 0.864883 0.538564 0.000000 Fe
19 | 0.183256 0.183252 0.251166 Ni
20 | 0.816744 0.816748 0.748834 Ni
21 | 0.816745 0.816750 0.251166 Ni
22 | 0.316754 0.683250 0.751173 Ni
23 | 0.316755 0.683251 0.248827 Ni
24 | 0.183255 0.183250 0.748834 Ni
25 | 0.683246 0.316750 0.248827 Ni
26 | 0.683245 0.316749 0.751173 Ni
27 | 0.400624 0.400610 0.000002 Ni
28 | 0.599376 0.599390 0.999998 Ni
29 | 0.099394 0.900608 0.500000 Ni
30 | 0.900606 0.099392 0.500000 Ni
31 | 0.736372 0.065140 0.999999 Ni
32 | 0.263628 0.934860 0.000001 Ni
33 | 0.434868 0.236376 0.500000 Ni
34 | 0.763620 0.565133 0.500000 Ni
35 | 0.565132 0.763624 0.500000 Ni
36 | 0.236380 0.434867 0.500000 Ni
37 | 0.065142 0.736370 0.999999 Ni
38 | 0.934858 0.263630 0.000001 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/22-Fe10Ni20.POSCAR:
--------------------------------------------------------------------------------
1 | Fe10 Ni20
2 | 1.0
3 | 8.578563 0.000121 -0.000052
4 | 0.000121 8.578523 -0.000035
5 | -0.000027 -0.000018 4.542766
6 | Fe Ni
7 | 10 20
8 | direct
9 | 0.000000 0.000000 0.000000 Fe
10 | 0.500000 0.500000 0.500000 Fe
11 | 0.733809 0.063224 0.000001 Fe
12 | 0.266191 0.936776 0.999999 Fe
13 | 0.436775 0.233822 0.500001 Fe
14 | 0.766180 0.563221 0.499999 Fe
15 | 0.563225 0.766178 0.499999 Fe
16 | 0.233820 0.436779 0.500001 Fe
17 | 0.063224 0.733807 0.000001 Fe
18 | 0.936776 0.266193 0.999999 Fe
19 | 0.182932 0.182930 0.250773 Ni
20 | 0.817068 0.817070 0.749227 Ni
21 | 0.817069 0.817071 0.250772 Ni
22 | 0.317089 0.682912 0.750760 Ni
23 | 0.317089 0.682912 0.249239 Ni
24 | 0.182931 0.182929 0.749228 Ni
25 | 0.682911 0.317088 0.249240 Ni
26 | 0.682911 0.317088 0.750761 Ni
27 | 0.401693 0.401695 0.999999 Ni
28 | 0.598307 0.598305 0.000001 Ni
29 | 0.098315 0.901682 0.500000 Ni
30 | 0.901685 0.098318 0.500000 Ni
31 | 0.461709 0.133499 0.999999 Ni
32 | 0.538291 0.866501 0.000001 Ni
33 | 0.366524 0.961704 0.500002 Ni
34 | 0.038293 0.633479 0.499998 Ni
35 | 0.633476 0.038296 0.499998 Ni
36 | 0.961707 0.366521 0.500002 Ni
37 | 0.133496 0.461709 0.999998 Ni
38 | 0.866504 0.538291 0.000002 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/23-Fe12Ni18.POSCAR:
--------------------------------------------------------------------------------
1 | Fe12 Ni18
2 | 1.0
3 | 8.456421 -0.000028 0.000012
4 | -0.000028 8.456001 -0.000012
5 | 0.000005 -0.000006 4.501389
6 | Fe Ni
7 | 12 18
8 | direct
9 | 0.183081 0.183058 0.251046 Fe
10 | 0.816919 0.816942 0.748954 Fe
11 | 0.816919 0.816943 0.251046 Fe
12 | 0.316942 0.683086 0.751062 Fe
13 | 0.316942 0.683086 0.248937 Fe
14 | 0.183081 0.183057 0.748954 Fe
15 | 0.683058 0.316914 0.248938 Fe
16 | 0.683058 0.316914 0.751063 Fe
17 | 0.398788 0.398743 0.000000 Fe
18 | 0.601212 0.601257 0.000000 Fe
19 | 0.101202 0.898813 0.500000 Fe
20 | 0.898798 0.101187 0.500000 Fe
21 | 0.000000 0.000000 0.000000 Ni
22 | 0.500000 0.500000 0.500000 Ni
23 | 0.462713 0.134076 0.999999 Ni
24 | 0.537287 0.865924 0.000001 Ni
25 | 0.365913 0.962727 0.499999 Ni
26 | 0.037286 0.634140 0.500000 Ni
27 | 0.634087 0.037273 0.500001 Ni
28 | 0.962714 0.365860 0.500000 Ni
29 | 0.134125 0.462710 0.000001 Ni
30 | 0.865875 0.537290 0.999999 Ni
31 | 0.735381 0.065342 0.000000 Ni
32 | 0.264619 0.934658 0.000000 Ni
33 | 0.434633 0.235367 0.500000 Ni
34 | 0.764614 0.565379 0.500000 Ni
35 | 0.565367 0.764633 0.500000 Ni
36 | 0.235386 0.434621 0.500000 Ni
37 | 0.065350 0.735419 0.000000 Ni
38 | 0.934650 0.264581 0.000000 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/24-Fe16Ni14.POSCAR:
--------------------------------------------------------------------------------
1 | Fe16 Ni14
2 | 1.0
3 | 8.486918 0.000108 -0.000041
4 | 0.000108 8.486906 0.000024
5 | -0.000015 0.000009 4.497512
6 | Fe Ni
7 | 16 14
8 | direct
9 | 0.184279 0.184289 0.251084 Fe
10 | 0.815721 0.815711 0.748916 Fe
11 | 0.815722 0.815710 0.251085 Fe
12 | 0.315679 0.684312 0.751081 Fe
13 | 0.315677 0.684313 0.248921 Fe
14 | 0.184278 0.184290 0.748915 Fe
15 | 0.684321 0.315688 0.248919 Fe
16 | 0.684323 0.315687 0.751079 Fe
17 | 0.735250 0.064185 0.999998 Fe
18 | 0.264750 0.935815 0.000002 Fe
19 | 0.435815 0.235223 0.500002 Fe
20 | 0.764777 0.564183 0.500003 Fe
21 | 0.564185 0.764777 0.499998 Fe
22 | 0.235223 0.435817 0.499997 Fe
23 | 0.064185 0.735252 0.000001 Fe
24 | 0.935815 0.264748 0.999999 Fe
25 | 0.000000 0.000000 0.000000 Ni
26 | 0.500000 0.500000 0.500000 Ni
27 | 0.401381 0.401386 0.999999 Ni
28 | 0.598619 0.598614 0.000001 Ni
29 | 0.098625 0.901369 0.500004 Ni
30 | 0.901375 0.098631 0.499996 Ni
31 | 0.462643 0.133105 0.000006 Ni
32 | 0.537357 0.866895 0.999994 Ni
33 | 0.366880 0.962646 0.500006 Ni
34 | 0.037354 0.633116 0.500003 Ni
35 | 0.633120 0.037354 0.499994 Ni
36 | 0.962646 0.366884 0.499997 Ni
37 | 0.133102 0.462646 0.999991 Ni
38 | 0.866898 0.537354 0.000009 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/25-Fe12Ni18.POSCAR:
--------------------------------------------------------------------------------
1 | Fe12 Ni18
2 | 1.0
3 | 8.522760 -0.000323 -0.000031
4 | -0.000323 8.522727 -0.000018
5 | -0.000012 -0.000007 4.515854
6 | Fe Ni
7 | 12 18
8 | direct
9 | 0.400875 0.400872 0.999999 Fe
10 | 0.599125 0.599128 0.000001 Fe
11 | 0.099138 0.900854 0.500000 Fe
12 | 0.900862 0.099146 0.500000 Fe
13 | 0.463096 0.132180 0.000000 Fe
14 | 0.536904 0.867820 0.000000 Fe
15 | 0.367869 0.963111 0.500000 Fe
16 | 0.036889 0.632128 0.500000 Fe
17 | 0.632131 0.036889 0.500000 Fe
18 | 0.963111 0.367872 0.500000 Fe
19 | 0.132181 0.463097 0.000000 Fe
20 | 0.867819 0.536903 0.000000 Fe
21 | 0.000000 0.000000 0.000000 Ni
22 | 0.500000 0.500000 0.500000 Ni
23 | 0.183219 0.183220 0.249352 Ni
24 | 0.816781 0.816780 0.750648 Ni
25 | 0.816781 0.816779 0.249352 Ni
26 | 0.316767 0.683234 0.749341 Ni
27 | 0.316766 0.683233 0.250658 Ni
28 | 0.183219 0.183221 0.750648 Ni
29 | 0.683233 0.316766 0.250659 Ni
30 | 0.683234 0.316767 0.749342 Ni
31 | 0.736090 0.064971 0.000001 Ni
32 | 0.263910 0.935029 0.999999 Ni
33 | 0.435037 0.236095 0.500000 Ni
34 | 0.763903 0.564965 0.499999 Ni
35 | 0.564963 0.763905 0.500000 Ni
36 | 0.236097 0.435035 0.500001 Ni
37 | 0.064971 0.736090 0.000000 Ni
38 | 0.935029 0.263910 0.000000 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/26-Fe8Ni22.POSCAR:
--------------------------------------------------------------------------------
1 | Fe8 Ni22
2 | 1.0
3 | 8.415348 -0.000017 0.000002
4 | -0.000017 8.414842 0.000003
5 | 0.000000 0.000000 4.465346
6 | Fe Ni
7 | 8 22
8 | direct
9 | 0.182783 0.182779 0.250949 Fe
10 | 0.817217 0.817221 0.749051 Fe
11 | 0.817217 0.817221 0.250949 Fe
12 | 0.317238 0.682770 0.750958 Fe
13 | 0.317238 0.682770 0.249042 Fe
14 | 0.182783 0.182779 0.749051 Fe
15 | 0.682762 0.317230 0.249042 Fe
16 | 0.682762 0.317230 0.750958 Fe
17 | 0.000000 0.000000 0.000000 Ni
18 | 0.500000 0.500000 0.500000 Ni
19 | 0.401093 0.401077 0.000001 Ni
20 | 0.598907 0.598923 0.999999 Ni
21 | 0.098928 0.901076 0.500000 Ni
22 | 0.901072 0.098924 0.500000 Ni
23 | 0.462344 0.132208 0.000001 Ni
24 | 0.537656 0.867792 0.999999 Ni
25 | 0.367803 0.962354 0.499999 Ni
26 | 0.037650 0.632199 0.500002 Ni
27 | 0.632197 0.037646 0.500001 Ni
28 | 0.962350 0.367801 0.499998 Ni
29 | 0.132187 0.462346 0.000000 Ni
30 | 0.867813 0.537654 0.000000 Ni
31 | 0.736086 0.066126 0.000000 Ni
32 | 0.263914 0.933874 0.000000 Ni
33 | 0.433885 0.236092 0.500000 Ni
34 | 0.763909 0.566122 0.500000 Ni
35 | 0.566115 0.763908 0.500000 Ni
36 | 0.236091 0.433878 0.500000 Ni
37 | 0.066128 0.736087 0.000000 Ni
38 | 0.933872 0.263913 0.000000 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/27-Cr28Fe2.POSCAR:
--------------------------------------------------------------------------------
1 | Cr28 Fe2
2 | 1.0
3 | 8.643427 0.000000 0.000000
4 | 0.000000 8.643427 0.000000
5 | 0.000000 0.000000 4.477482
6 | Cr Fe
7 | 28 2
8 | direct
9 | 0.182908 0.182908 0.253097 Cr
10 | 0.817092 0.817092 0.746903 Cr
11 | 0.817092 0.817092 0.253097 Cr
12 | 0.317092 0.682908 0.753097 Cr
13 | 0.317092 0.682908 0.246903 Cr
14 | 0.182908 0.182908 0.746903 Cr
15 | 0.682908 0.317092 0.246903 Cr
16 | 0.682908 0.317092 0.753097 Cr
17 | 0.396360 0.396360 0.000000 Cr
18 | 0.603640 0.603640 0.000000 Cr
19 | 0.103640 0.896360 0.500000 Cr
20 | 0.896360 0.103640 0.500000 Cr
21 | 0.463341 0.127851 0.000000 Cr
22 | 0.536659 0.872149 0.000000 Cr
23 | 0.372149 0.963341 0.500000 Cr
24 | 0.036659 0.627851 0.500000 Cr
25 | 0.627851 0.036659 0.500000 Cr
26 | 0.963341 0.372149 0.500000 Cr
27 | 0.127851 0.463341 0.000000 Cr
28 | 0.872149 0.536659 0.000000 Cr
29 | 0.742715 0.065134 0.000000 Cr
30 | 0.257285 0.934866 0.000000 Cr
31 | 0.434866 0.242715 0.500000 Cr
32 | 0.757285 0.565134 0.500000 Cr
33 | 0.565134 0.757285 0.500000 Cr
34 | 0.242715 0.434866 0.500000 Cr
35 | 0.065134 0.742715 0.000000 Cr
36 | 0.934866 0.257285 0.000000 Cr
37 | 0.000000 0.000000 0.000000 Fe
38 | 0.500000 0.500000 0.500000 Fe
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/28-Fe26Ni4.POSCAR:
--------------------------------------------------------------------------------
1 | Fe26 Ni4
2 | 1.0
3 | 8.550355 -0.000199 -0.000095
4 | -0.000199 8.550373 -0.000094
5 | -0.000043 -0.000043 4.510999
6 | Fe Ni
7 | 26 4
8 | direct
9 | 0.000000 0.000000 0.000000 Fe
10 | 0.500000 0.500000 0.500000 Fe
11 | 0.184952 0.184950 0.250099 Fe
12 | 0.815048 0.815050 0.749901 Fe
13 | 0.815052 0.815054 0.250107 Fe
14 | 0.315023 0.684979 0.750075 Fe
15 | 0.315023 0.684979 0.249925 Fe
16 | 0.184948 0.184946 0.749893 Fe
17 | 0.684977 0.315021 0.249925 Fe
18 | 0.684977 0.315021 0.750075 Fe
19 | 0.463894 0.134144 0.999997 Fe
20 | 0.536106 0.865856 0.000003 Fe
21 | 0.365855 0.963894 0.500004 Fe
22 | 0.036106 0.634144 0.499996 Fe
23 | 0.634145 0.036106 0.499996 Fe
24 | 0.963894 0.365856 0.500004 Fe
25 | 0.134142 0.463896 0.999997 Fe
26 | 0.865858 0.536104 0.000003 Fe
27 | 0.736085 0.064987 0.999998 Fe
28 | 0.263915 0.935013 0.000002 Fe
29 | 0.435010 0.236082 0.499998 Fe
30 | 0.763918 0.564991 0.500002 Fe
31 | 0.564990 0.763918 0.500002 Fe
32 | 0.236082 0.435009 0.499998 Fe
33 | 0.064986 0.736084 0.999998 Fe
34 | 0.935014 0.263916 0.000002 Fe
35 | 0.399422 0.399427 0.999997 Ni
36 | 0.600578 0.600573 0.000003 Ni
37 | 0.100557 0.899440 0.500000 Ni
38 | 0.899443 0.100560 0.500000 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/29-Fe12Ni18.POSCAR:
--------------------------------------------------------------------------------
1 | Fe12 Ni18
2 | 1.0
3 | 8.441462 -0.000211 -0.000001
4 | -0.000211 8.441453 -0.000001
5 | 0.000001 -0.000004 4.534835
6 | Fe Ni
7 | 12 18
8 | direct
9 | 0.402923 0.402928 0.000000 Fe
10 | 0.597077 0.597072 0.000000 Fe
11 | 0.097059 0.902938 0.500001 Fe
12 | 0.902941 0.097062 0.499999 Fe
13 | 0.732691 0.064830 0.000000 Fe
14 | 0.267309 0.935170 0.000000 Fe
15 | 0.435103 0.232680 0.500000 Fe
16 | 0.767318 0.564898 0.500001 Fe
17 | 0.564897 0.767320 0.500000 Fe
18 | 0.232682 0.435102 0.499999 Fe
19 | 0.064831 0.732694 0.000001 Fe
20 | 0.935169 0.267306 0.999999 Fe
21 | 0.000000 0.000000 0.000000 Ni
22 | 0.500000 0.500000 0.500000 Ni
23 | 0.181716 0.181720 0.249579 Ni
24 | 0.818284 0.818280 0.750421 Ni
25 | 0.818285 0.818279 0.249581 Ni
26 | 0.318282 0.681714 0.749570 Ni
27 | 0.318283 0.681713 0.250427 Ni
28 | 0.181715 0.181721 0.750419 Ni
29 | 0.681718 0.318286 0.250430 Ni
30 | 0.681717 0.318287 0.749573 Ni
31 | 0.461652 0.135879 0.000003 Ni
32 | 0.538348 0.864121 0.999997 Ni
33 | 0.364110 0.961689 0.500001 Ni
34 | 0.038312 0.635895 0.500002 Ni
35 | 0.635890 0.038311 0.499999 Ni
36 | 0.961688 0.364105 0.499998 Ni
37 | 0.135880 0.461651 0.999996 Ni
38 | 0.864120 0.538349 0.000004 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/3-Cr18Fe12.POSCAR:
--------------------------------------------------------------------------------
1 | Cr18 Fe12
2 | 1.0
3 | 8.489195 0.000105 -0.000004
4 | 0.000105 8.489439 -0.000005
5 | -0.000002 -0.000002 4.455240
6 | Cr Fe
7 | 18 12
8 | direct
9 | 0.000000 0.000000 0.000000 Cr
10 | 0.500000 0.500000 0.500000 Cr
11 | 0.188987 0.188963 0.254031 Cr
12 | 0.811013 0.811037 0.745969 Cr
13 | 0.811013 0.811037 0.254032 Cr
14 | 0.311025 0.688986 0.753873 Cr
15 | 0.311025 0.688986 0.246126 Cr
16 | 0.188987 0.188963 0.745968 Cr
17 | 0.688975 0.311014 0.246127 Cr
18 | 0.688975 0.311014 0.753874 Cr
19 | 0.740255 0.057767 0.000000 Cr
20 | 0.259745 0.942233 0.000000 Cr
21 | 0.442252 0.240233 0.500000 Cr
22 | 0.759703 0.557801 0.500000 Cr
23 | 0.557748 0.759767 0.500000 Cr
24 | 0.240297 0.442199 0.500000 Cr
25 | 0.057799 0.740325 0.000000 Cr
26 | 0.942201 0.259675 0.000000 Cr
27 | 0.399180 0.399128 0.000000 Fe
28 | 0.600820 0.600872 0.000000 Fe
29 | 0.100893 0.899190 0.500000 Fe
30 | 0.899107 0.100810 0.500000 Fe
31 | 0.467048 0.130583 0.000000 Fe
32 | 0.532952 0.869417 0.000000 Fe
33 | 0.369359 0.967026 0.500000 Fe
34 | 0.032932 0.630538 0.500000 Fe
35 | 0.630641 0.032974 0.500000 Fe
36 | 0.967068 0.369462 0.500000 Fe
37 | 0.130567 0.467076 0.000000 Fe
38 | 0.869433 0.532924 0.000000 Fe
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/30-Cr26Fe4.POSCAR:
--------------------------------------------------------------------------------
1 | Cr26 Fe4
2 | 1.0
3 | 8.516665 0.000725 0.000000
4 | 0.000725 8.516655 0.000001
5 | 0.000000 0.000000 4.468380
6 | Cr Fe
7 | 26 4
8 | direct
9 | 0.000000 0.000000 0.000000 Cr
10 | 0.500000 0.500000 0.500000 Cr
11 | 0.183395 0.183394 0.252095 Cr
12 | 0.816605 0.816606 0.747905 Cr
13 | 0.816605 0.816606 0.252095 Cr
14 | 0.316691 0.683308 0.752050 Cr
15 | 0.316691 0.683307 0.247950 Cr
16 | 0.183395 0.183394 0.747905 Cr
17 | 0.683309 0.316692 0.247950 Cr
18 | 0.683309 0.316693 0.752050 Cr
19 | 0.463108 0.131801 0.000000 Cr
20 | 0.536892 0.868199 0.000000 Cr
21 | 0.368318 0.963107 0.500000 Cr
22 | 0.036892 0.631682 0.500000 Cr
23 | 0.631682 0.036893 0.500000 Cr
24 | 0.963108 0.368318 0.500000 Cr
25 | 0.131801 0.463108 0.000000 Cr
26 | 0.868199 0.536892 0.000000 Cr
27 | 0.738988 0.065487 0.000000 Cr
28 | 0.261012 0.934513 0.000000 Cr
29 | 0.434541 0.239051 0.500000 Cr
30 | 0.760951 0.565457 0.500000 Cr
31 | 0.565459 0.760949 0.500000 Cr
32 | 0.239049 0.434543 0.500000 Cr
33 | 0.065487 0.738989 0.000000 Cr
34 | 0.934513 0.261011 0.000000 Cr
35 | 0.397471 0.397471 0.000000 Fe
36 | 0.602529 0.602529 0.000000 Fe
37 | 0.102480 0.897519 0.500000 Fe
38 | 0.897520 0.102481 0.500000 Fe
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/4-Fe30.POSCAR:
--------------------------------------------------------------------------------
1 | Fe30
2 | 1.0
3 | 8.592319 0.000000 0.000000
4 | 0.000000 8.592319 0.000000
5 | 0.000000 0.000000 4.510971
6 | Fe
7 | 30
8 | direct
9 | 0.000000 0.000000 0.000000 Fe
10 | 0.500000 0.500000 0.500000 Fe
11 | 0.398142 0.398142 0.000000 Fe
12 | 0.601858 0.601858 0.000000 Fe
13 | 0.101858 0.898142 0.500000 Fe
14 | 0.898142 0.101858 0.500000 Fe
15 | 0.463568 0.130736 0.000000 Fe
16 | 0.536432 0.869264 0.000000 Fe
17 | 0.369264 0.963568 0.500000 Fe
18 | 0.036432 0.630736 0.500000 Fe
19 | 0.630736 0.036432 0.500000 Fe
20 | 0.963568 0.369264 0.500000 Fe
21 | 0.130736 0.463568 0.000000 Fe
22 | 0.869264 0.536432 0.000000 Fe
23 | 0.738668 0.065542 0.000000 Fe
24 | 0.261332 0.934458 0.000000 Fe
25 | 0.434458 0.238668 0.500000 Fe
26 | 0.761332 0.565542 0.500000 Fe
27 | 0.565542 0.761332 0.500000 Fe
28 | 0.238668 0.434458 0.500000 Fe
29 | 0.065542 0.738668 0.000000 Fe
30 | 0.934458 0.261332 0.000000 Fe
31 | 0.182821 0.182821 0.251074 Fe
32 | 0.817179 0.817179 0.748926 Fe
33 | 0.817179 0.817179 0.251074 Fe
34 | 0.317179 0.682821 0.751074 Fe
35 | 0.317179 0.682821 0.248926 Fe
36 | 0.182821 0.182821 0.748926 Fe
37 | 0.682821 0.317179 0.248926 Fe
38 | 0.682821 0.317179 0.751074 Fe
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/5-Cr22Fe8.POSCAR:
--------------------------------------------------------------------------------
1 | Cr22 Fe8
2 | 1.0
3 | 8.451805 0.000262 0.000589
4 | 0.000262 8.451220 -0.001047
5 | 0.000306 -0.000580 4.508278
6 | Cr Fe
7 | 22 8
8 | direct
9 | 0.000000 0.000000 0.000000 Cr
10 | 0.500000 0.500000 0.500000 Cr
11 | 0.399834 0.399844 0.000013 Cr
12 | 0.600166 0.600156 0.999987 Cr
13 | 0.100099 0.899889 0.499999 Cr
14 | 0.899901 0.100111 0.500001 Cr
15 | 0.462410 0.132455 0.000038 Cr
16 | 0.537590 0.867545 0.999962 Cr
17 | 0.367541 0.962435 0.500017 Cr
18 | 0.037557 0.632433 0.500040 Cr
19 | 0.632459 0.037565 0.499983 Cr
20 | 0.962443 0.367567 0.499960 Cr
21 | 0.132419 0.462420 0.999983 Cr
22 | 0.867581 0.537580 0.000017 Cr
23 | 0.739960 0.064243 0.000037 Cr
24 | 0.260040 0.935757 0.999963 Cr
25 | 0.435708 0.239898 0.499918 Cr
26 | 0.760143 0.564283 0.499950 Cr
27 | 0.564292 0.760102 0.500082 Cr
28 | 0.239857 0.435717 0.500050 Cr
29 | 0.064229 0.739919 0.999930 Cr
30 | 0.935771 0.260081 0.000070 Cr
31 | 0.183531 0.183539 0.253737 Fe
32 | 0.816469 0.816461 0.746263 Fe
33 | 0.816471 0.816463 0.253741 Fe
34 | 0.316462 0.683527 0.753761 Fe
35 | 0.316458 0.683530 0.246226 Fe
36 | 0.183529 0.183537 0.746259 Fe
37 | 0.683538 0.316473 0.246239 Fe
38 | 0.683542 0.316470 0.753774 Fe
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/6-Fe2Ni28.POSCAR:
--------------------------------------------------------------------------------
1 | Fe2 Ni28
2 | 1.0
3 | 8.367795 0.000031 -0.000258
4 | 0.000031 8.367814 0.000335
5 | -0.000136 0.000173 4.425713
6 | Fe Ni
7 | 2 28
8 | direct
9 | 0.000000 0.000000 0.000000 Fe
10 | 0.500000 0.500000 0.500000 Fe
11 | 0.180648 0.180647 0.250761 Ni
12 | 0.819352 0.819353 0.749239 Ni
13 | 0.819355 0.819349 0.250761 Ni
14 | 0.319365 0.680633 0.750770 Ni
15 | 0.319364 0.680638 0.249221 Ni
16 | 0.180645 0.180651 0.749239 Ni
17 | 0.680635 0.319367 0.249230 Ni
18 | 0.680636 0.319362 0.750779 Ni
19 | 0.402318 0.402323 0.000001 Ni
20 | 0.597682 0.597677 0.999999 Ni
21 | 0.097685 0.902321 0.500005 Ni
22 | 0.902315 0.097679 0.499995 Ni
23 | 0.462431 0.133465 0.000010 Ni
24 | 0.537569 0.866535 0.999990 Ni
25 | 0.366551 0.962429 0.500003 Ni
26 | 0.037572 0.633454 0.500009 Ni
27 | 0.633449 0.037571 0.499997 Ni
28 | 0.962428 0.366546 0.499991 Ni
29 | 0.133470 0.462431 0.999994 Ni
30 | 0.866530 0.537569 0.000006 Ni
31 | 0.737116 0.065863 0.000001 Ni
32 | 0.262884 0.934137 0.999999 Ni
33 | 0.434144 0.237144 0.499998 Ni
34 | 0.762851 0.565860 0.499999 Ni
35 | 0.565856 0.762856 0.500002 Ni
36 | 0.237149 0.434140 0.500001 Ni
37 | 0.065865 0.737118 0.000000 Ni
38 | 0.934135 0.262882 0.000000 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/7-Cr18Fe12.POSCAR:
--------------------------------------------------------------------------------
1 | Cr18 Fe12
2 | 1.0
3 | 8.457185 0.000228 -0.000052
4 | 0.000228 8.457138 0.000023
5 | -0.000026 0.000012 4.353422
6 | Cr Fe
7 | 18 12
8 | direct
9 | 0.000000 0.000000 0.000000 Cr
10 | 0.500000 0.500000 0.500000 Cr
11 | 0.182708 0.182718 0.253272 Cr
12 | 0.817292 0.817282 0.746728 Cr
13 | 0.817292 0.817282 0.253273 Cr
14 | 0.317257 0.682733 0.753296 Cr
15 | 0.317257 0.682733 0.246706 Cr
16 | 0.182708 0.182718 0.746727 Cr
17 | 0.682743 0.317267 0.246704 Cr
18 | 0.682743 0.317267 0.753294 Cr
19 | 0.463815 0.132637 0.999998 Cr
20 | 0.536185 0.867363 0.000002 Cr
21 | 0.367340 0.963827 0.499996 Cr
22 | 0.036168 0.632649 0.499998 Cr
23 | 0.632660 0.036173 0.500004 Cr
24 | 0.963832 0.367351 0.500002 Cr
25 | 0.132639 0.463817 0.000004 Cr
26 | 0.867361 0.536183 0.999996 Cr
27 | 0.397036 0.397046 0.000000 Fe
28 | 0.602964 0.602954 0.000000 Fe
29 | 0.102984 0.897014 0.499999 Fe
30 | 0.897016 0.102986 0.500001 Fe
31 | 0.738128 0.068173 0.999996 Fe
32 | 0.261872 0.931827 0.000004 Fe
33 | 0.431830 0.238118 0.500002 Fe
34 | 0.761896 0.568159 0.500004 Fe
35 | 0.568170 0.761882 0.499998 Fe
36 | 0.238104 0.431841 0.499996 Fe
37 | 0.068169 0.738117 0.000002 Fe
38 | 0.931831 0.261883 0.999998 Fe
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/8-Cr2Fe16Ni12.POSCAR:
--------------------------------------------------------------------------------
1 | Cr2 Fe16 Ni12
2 | 1.0
3 | 8.556466 0.000000 0.000000
4 | 0.000000 8.556466 0.000000
5 | 0.000000 0.000000 4.455660
6 | Cr Fe Ni
7 | 2 16 12
8 | direct
9 | 0.000000 0.000000 0.000000 Cr
10 | 0.500000 0.500000 0.500000 Cr
11 | 0.461391 0.132780 0.000000 Fe
12 | 0.538609 0.867220 0.000000 Fe
13 | 0.367220 0.961391 0.500000 Fe
14 | 0.038609 0.632780 0.500000 Fe
15 | 0.632780 0.038609 0.500000 Fe
16 | 0.961391 0.367220 0.500000 Fe
17 | 0.132780 0.461391 0.000000 Fe
18 | 0.867220 0.538609 0.000000 Fe
19 | 0.180706 0.180706 0.251496 Fe
20 | 0.819294 0.819294 0.748504 Fe
21 | 0.819294 0.819294 0.251496 Fe
22 | 0.319294 0.680706 0.751496 Fe
23 | 0.319294 0.680706 0.248504 Fe
24 | 0.180706 0.180706 0.748504 Fe
25 | 0.680706 0.319294 0.248504 Fe
26 | 0.680706 0.319294 0.751496 Fe
27 | 0.402016 0.402016 0.000000 Ni
28 | 0.597984 0.597984 0.000000 Ni
29 | 0.097984 0.902016 0.500000 Ni
30 | 0.902016 0.097984 0.500000 Ni
31 | 0.737615 0.068604 0.000000 Ni
32 | 0.262385 0.931396 0.000000 Ni
33 | 0.431396 0.237615 0.500000 Ni
34 | 0.762385 0.568604 0.500000 Ni
35 | 0.568604 0.762385 0.500000 Ni
36 | 0.237615 0.431396 0.500000 Ni
37 | 0.068604 0.737615 0.000000 Ni
38 | 0.931396 0.262385 0.000000 Ni
39 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/exampleInputFiles/9-Pb8O12.POSCAR:
--------------------------------------------------------------------------------
1 | Pb O
2 | 1.0
3 | 5.885235 0.000000 0.000000
4 | 0.000000 6.086241 0.000000
5 | 0.000000 0.000000 8.453919
6 | O Pb
7 | 12 8
8 | direct
9 | 0.6910089402 0.3018135496 0.0481327063
10 | 0.8089923342 0.8018134675 0.0481327063
11 | 0.1023850365 0.4663453189 0.2500000296
12 | 0.3976153883 0.9663452367 0.2500000296
13 | 0.6910089402 0.3018135496 0.4518673529
14 | 0.8089923342 0.8018134675 0.4518673529
15 | 0.1910085154 0.1981863682 0.5481327654
16 | 0.3089919094 0.6981862861 0.5481327654
17 | 0.6023837621 0.0336545990 0.7500000887
18 | 0.8976158131 0.5336545168 0.7500000887
19 | 0.1910085154 0.1981863682 0.9518674120
20 | 0.3089919094 0.6981862861 0.9518674120
21 | 0.5000004248 0.0000000000 0.0000000000
22 | 0.0000000000 0.4999999178 0.0000000000
23 | 0.9911804711 0.0424679207 0.2500000296
24 | 0.5088191041 0.5424678385 0.2500000296
25 | 0.5000004248 0.0000000000 0.5000000591
26 | 0.0000000000 0.4999999178 0.5000000591
27 | 0.4911800463 0.4575319972 0.7500000887
28 | 0.0088186793 0.9575319150 0.7500000887
29 |
--------------------------------------------------------------------------------
/pysipfenn/tests/testCaseFiles/prototypeLibrary-custom.yaml:
--------------------------------------------------------------------------------
1 | - name: NicePhase
2 | origin: https://somecustomsource.org
3 | POSCAR: |
4 | A1_U
5 | 1.0
6 | 0.00000 1.80750 1.80750
7 | 1.80750 0.00000 1.80750
8 | 1.80750 1.80750 0.00000
9 | U
10 | 1
11 | Direct
12 | 0.00000 0.00000 0.00000
--------------------------------------------------------------------------------
/pysipfenn/tests/test_AllCompatibleONNX_Ward2017.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import pytest
3 | import os
4 | from importlib import resources
5 |
6 | import pysipfenn
7 |
8 | IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true" and os.getenv("MODELS_FETCHED") != "true"
9 |
10 | class TestAllCompatibleONNX_Ward2017(unittest.TestCase):
11 | '''_Requires the models to be downloaded first._ It then tests the **runtime** of the pySIPFENN on all POSCAR
12 | files in the exampleInputFiles directory and persistence of the results in a CSV file.
13 | '''
14 | @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test depends on the ONNX network files")
15 | def test_runtime(self):
16 | '''Runs the test.'''
17 | c = pysipfenn.Calculator()
18 | with resources.files('pysipfenn').joinpath('tests/testCaseFiles/exampleInputFiles/') as exampleInputsDir:
19 | c.runFromDirectory(directory=exampleInputsDir, descriptor='Ward2017')
20 | print(c.get_resultDicts())
21 | c.writeResultsToCSV('Ward2017-ONNX_testResults.csv')
22 |
--------------------------------------------------------------------------------
/pysipfenn/tests/test_Core_prototypeLibrary.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | from pymatgen.core import Structure
3 | from importlib import resources
4 | import shutil
5 | import pysipfenn
6 | import pytest
7 | import os
8 |
9 | class TestPL(unittest.TestCase):
10 | """Tests correct loading of the prototype library (used, e.g., for random solid solution generation)."""
11 |
12 | def setUp(self) -> None:
13 | """Load the prototype library."""
14 | self.c = pysipfenn.Calculator(autoLoad=False)
15 |
16 | def test_autoload(self):
17 | """Test that the default prototype library is loaded."""
18 | self.assertTrue(self.c.prototypeLibrary is not None)
19 | self.assertTrue(len(self.c.prototypeLibrary) > 0)
20 |
21 | def test_defaultPresent(self):
22 | """Test that the loaded prototype library was correctly parsed."""
23 | for prototype in ["FCC", "BCC", "HCP", "Diamond", "DHCP", "Sn_A5"]:
24 | with self.subTest(msg=prototype):
25 | self.assertTrue(prototype in self.c.prototypeLibrary)
26 |
27 | def test_correctContentFCC(self):
28 | """Test that the FCC prototype was correctly parsed."""
29 | fcc = self.c.prototypeLibrary["FCC"]
30 | self.assertEqual(fcc["origin"], "https://www.oqmd.org/materials/prototype/A1_Cu")
31 | self.assertEqual(
32 | fcc["POSCAR"],
33 | ('A1_Cu\n'
34 | '1.0\n'
35 | ' 0.00000 1.80750 1.80750\n'
36 | ' 1.80750 0.00000 1.80750\n'
37 | ' 1.80750 1.80750 0.00000\n'
38 | 'Cu\n'
39 | '1\n'
40 | 'Direct\n'
41 | ' 0.00000 0.00000 0.00000\n'))
42 | with self.subTest(msg="Is a pymatgen Structure"):
43 | self.assertTrue(isinstance(fcc["structure"], Structure))
44 | with self.subTest(msg="Is valid pymatgen Structure"):
45 | self.assertTrue(fcc["structure"].is_valid())
46 | with self.subTest(msg="Has correct formula"):
47 | self.assertEqual(fcc["structure"].formula, "Cu1")
48 |
49 | def test_customPrototypeLoad(self):
50 | """Test that a custom prototype can be loaded. Then test that a custom prototype can be appended to the default
51 | library and stay there."""
52 |
53 | with resources.files('pysipfenn').joinpath('tests/testCaseFiles/prototypeLibrary-custom.yaml') as f:
54 | self.c.parsePrototypeLibrary(customPath=f, verbose=True, printCustomLibrary=True)
55 |
56 | with self.subTest(msg="Custom prototype present with correct parse"):
57 | self.assertTrue("NicePhase" in self.c.prototypeLibrary)
58 | self.assertEqual(self.c.prototypeLibrary["NicePhase"]["origin"], "https://somecustomsource.org")
59 |
60 | with self.subTest(msg="Nice phase is a valid pymatgen Structure"):
61 | self.assertTrue(isinstance(self.c.prototypeLibrary["NicePhase"]["structure"], Structure))
62 | self.assertTrue(self.c.prototypeLibrary["NicePhase"]["structure"].is_valid())
63 | self.assertEqual(self.c.prototypeLibrary["NicePhase"]["structure"].formula, "U1")
64 |
65 | with self.subTest(msg="FCC prototype still present"):
66 | self.assertTrue("FCC" in self.c.prototypeLibrary)
67 |
68 | with self.subTest(msg="Test that it does not affect the default prototype library"):
69 | otherC = pysipfenn.Calculator(autoLoad=False)
70 | self.assertTrue("NicePhase" not in otherC.prototypeLibrary)
71 |
72 | # Create a backup of the default library
73 | self.c = pysipfenn.Calculator(autoLoad=False)
74 | backup = self.c.prototypeLibrary.copy()
75 |
76 | with resources.files('pysipfenn').joinpath('tests/testCaseFiles/prototypeLibrary-custom.yaml') as f:
77 | self.c.appendPrototypeLibrary(customPath=f)
78 |
79 | with self.subTest(msg="Custom prototype present and valid in a different Calculator instance"):
80 | otherC = pysipfenn.Calculator(autoLoad=False)
81 | self.assertTrue("NicePhase" in otherC.prototypeLibrary)
82 | self.assertEqual(otherC.prototypeLibrary["NicePhase"]["origin"], "https://somecustomsource.org")
83 | self.assertTrue(isinstance(otherC.prototypeLibrary["NicePhase"]["structure"], Structure))
84 | self.assertTrue(otherC.prototypeLibrary["NicePhase"]["structure"].is_valid())
85 | self.assertEqual(otherC.prototypeLibrary["NicePhase"]["structure"].formula, "U1")
86 |
87 | with self.subTest(msg="FCC/BCC/HCP prototype still present in a different Calculator instance"):
88 | self.assertTrue("FCC" in otherC.prototypeLibrary)
89 | self.assertTrue("BCC" in otherC.prototypeLibrary)
90 | self.assertTrue("HCP" in otherC.prototypeLibrary)
91 |
92 | with self.subTest(msg="Restore the original prototype library"):
93 | pysipfenn.overwritePrototypeLibrary(backup)
94 |
--------------------------------------------------------------------------------
/pysipfenn/tests/test_KS2022.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import csv
3 | import os
4 | from pymatgen.core import Structure
5 | from tqdm import tqdm
6 | import numpy as np
7 | from natsort import natsorted
8 | from importlib import resources
9 |
10 | from pysipfenn.descriptorDefinitions import KS2022
11 |
12 |
13 | class TestKS2022(unittest.TestCase):
14 | '''Tests the correctness of the KS2022 descriptor generation function by comparing the results to the reference data
15 | for the first 25 structures in the exampleInputFiles directory, stored in the exampleInputFilesDescriptorTable.csv.
16 | That file that is also used to test the correctness of the Ward2017, which is a superset of the KS2022.
17 | '''
18 | def setUp(self):
19 | '''Reads the reference data from the exampleInputFilesDescriptorTable.csv file and the labels from the first
20 | row of that file. Then it reads the first 25 structures from the exampleInputFiles directory and generates the
21 | descriptors for them. The results are stored in the functionOutput list. It defines the emptyLabelsIndx list
22 | that contains the indices of the labels that are not used in the KS2022 (vs Ward2017) descriptor generation. It
23 | also persists the test results in the KS2022_TestResult.csv file.
24 | '''
25 | with resources.files('pysipfenn'). \
26 | joinpath('tests/testCaseFiles/exampleInputFilesDescriptorTable.csv').open('r', newline='') as f:
27 | reader = csv.reader(f)
28 | referenceDescriptorTable = list(reader)
29 |
30 | self.labels = referenceDescriptorTable[0]
31 | self.testReferenceData = np.float_(referenceDescriptorTable[1:]).tolist()
32 | emptyLabels = [
33 | 'mean_WCMagnitude_Shell1', 'mean_WCMagnitude_Shell2', 'mean_WCMagnitude_Shell3',
34 | 'mean_NeighDiff_shell1_SpaceGroupNumber', 'var_NeighDiff_shell1_SpaceGroupNumber',
35 | 'min_NeighDiff_shell1_SpaceGroupNumber', 'max_NeighDiff_shell1_SpaceGroupNumber',
36 | 'range_NeighDiff_shell1_SpaceGroupNumber', 'mean_SpaceGroupNumber', 'maxdiff_SpaceGroupNumber',
37 | 'dev_SpaceGroupNumber', 'max_SpaceGroupNumber', 'min_SpaceGroupNumber', 'most_SpaceGroupNumber',
38 | 'CanFormIonic']
39 | emptyLabels.reverse()
40 | self.emptyLabelsIndx = [self.labels.index(l) for l in emptyLabels]
41 |
42 | with resources.files('pysipfenn').joinpath('tests/testCaseFiles/exampleInputFiles/') as exampleInputsDir:
43 | self.exampleInputFiles = natsorted(os.listdir(exampleInputsDir))
44 | testStructures = [Structure.from_file(f'{exampleInputsDir}/{eif}') for eif in self.exampleInputFiles]
45 |
46 | self.functionOutput = [KS2022.generate_descriptor(s).tolist() for s in tqdm(testStructures[:25])]
47 | with resources.files('pysipfenn').joinpath('tests/KS2022_TestResult.csv').open('w+', newline='') as f:
48 | f.writelines([f'{v}\n' for v in self.functionOutput[0]])
49 |
50 | def test_resutls(self):
51 | '''Compares the results of the KS2022 descriptor generation function to the reference data on a field-by-field
52 | basis by calculating the relative difference between the two and requiring it to be less than 1% for all fields
53 | except 0-valued fields, where the absolute difference is required to be less than 1e-6.
54 | '''
55 | for fo, trd, name in zip(self.functionOutput, self.testReferenceData, self.exampleInputFiles):
56 | for eli in self.emptyLabelsIndx:
57 | trd.pop(eli)
58 | for p_fo, p_trd, l in zip(fo, trd, self.labels):
59 | if p_trd!=0 and p_fo!=0:
60 | p_fo_relative = p_fo/p_trd
61 | with self.subTest(msg=f'{name:<16} diff in {l}'):
62 | self.assertAlmostEqual(p_fo_relative, 1, places=2)
63 | else:
64 | with self.subTest(msg=f'{name:<16} diff in {l}'):
65 | self.assertAlmostEqual(p_fo, p_trd, places=6)
66 |
67 | def test_cite(self):
68 | """Tests citation return."""
69 | citation = KS2022.cite()
70 | self.assertIn("Krajewski", citation[0])
71 |
72 | class TestKS2022Profiling(unittest.TestCase):
73 | '''Test the KS2022 descriptor generation by profiling the execution time of the descriptor generation function
74 | for two example structures (JVASP-10001 and diluteNiAlloy).
75 | '''
76 | def test_serial(self):
77 | '''Test the serial execution of the descriptor generation function 4 times for each of the two examples.'''
78 | KS2022.profile(test='JVASP-10001', nRuns=4)
79 | KS2022.profile(test='diluteNiAlloy', nRuns=4)
80 |
81 | def test_parallel(self):
82 | '''Test the parallel execution of the descriptor generation function 24 times for each of the two examples
83 | but in parallel with up to 8 workers to speed up the execution.
84 | '''
85 | KS2022.profileParallel(test='JVASP-10001', nRuns=24)
86 | KS2022.profileParallel(test='diluteNiAlloy', nRuns=24)
87 |
--------------------------------------------------------------------------------
/pysipfenn/tests/test_KS2022_randomSolutions.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import csv
3 | import numpy as np
4 | from importlib import resources
5 | from tqdm.contrib.concurrent import process_map
6 |
7 | from pysipfenn.descriptorDefinitions import KS2022_randomSolutions
8 |
9 |
10 | class TestKSRandomSolution2022(unittest.TestCase):
11 | def setUp(self):
12 | '''Load the feature ranges and means from the test file as calculated for the testing/profiling case included
13 | in the KS2022_randomSolution script run for 50 iterations over BCC Cr12.8 Fe12.8 Co12.8 Ni12.8 Cu12.8 Al35.9
14 | alloy.
15 | '''
16 | testFilePath = 'tests/testCaseFiles/TestFile_DescriptorData_KS2022_randomSolution_valueRangesMeans.csv'
17 | with resources.files('pysipfenn').joinpath(testFilePath).open('r', newline='') as f:
18 | reader = csv.reader(f)
19 | self.descriptorRangeList, self.descriptorMeanList = np.float_(list(reader)).T
20 |
21 | with resources.files('pysipfenn').joinpath('descriptorDefinitions/labels_KS2022.csv').open('r') as f:
22 | reader = csv.reader(f)
23 | self.labels = [row[0] for row in reader]
24 |
25 | def test_results(self):
26 | '''Test the descriptor generation function by comparing the results feature by feature to the reference data
27 | statistics, testing whether the result is within the observed range of values from the observed mean value
28 | allowing for additional 2% deviation from the mean value to handle numerical precision in cases where the
29 | feature converges to near exactly the mean value with near-zero range (e.g. coordination number in BCC in case
30 | of ideal lattice positions).
31 | '''
32 | testValues, meta = KS2022_randomSolutions.profile(
33 | test='BCC',
34 | returnDescriptorAndMeta=True,
35 | plotParameters=True)
36 |
37 | for testValue, descriptorRange, descriptorMean, label in zip(
38 | testValues,
39 | self.descriptorRangeList,
40 | self.descriptorMeanList,
41 | self.labels):
42 | with self.subTest(msg=f'{label} in BCC alloy'):
43 | self.assertGreaterEqual(testValue, (0.95*descriptorMean)-descriptorRange-1e-4)
44 | self.assertLessEqual(testValue, (1.05*descriptorMean)+descriptorRange+1e-4)
45 |
46 | for field in ['diffHistory', 'propHistory', 'finalAtomsN', 'finalCompositionDistance', 'finalComposition']:
47 | with self.subTest(msg=f'{field} present in meta'):
48 | self.assertIn(field, meta)
49 |
50 | with self.subTest(msg="Verify runtime of onlyStructural function to select slices of the descriptor"):
51 | structuralValues = KS2022_randomSolutions.onlyStructural(testValues)
52 | self.assertEqual(len(structuralValues), 103)
53 |
54 | def test_errors(self):
55 | '''Check if correct errors are raised when: (1) the test structure is not implemented.'''
56 | with self.assertRaises(NotImplementedError):
57 | KS2022_randomSolutions.profile(test='CrazyStructure')
58 |
59 | def test_cite(self):
60 | """Tests citation return."""
61 | citation = KS2022_randomSolutions.cite()
62 | self.assertIn("Krajewski", citation[0])
63 |
64 |
65 | class TestKS2022RandomSolutionProfiling(unittest.TestCase):
66 | '''Test the KS2022 RS descriptor generation by profiling the execution time for example composition for each
67 | common alloy structure: BCC, FCC, HCP. The profiling is serial inside each task, but done in parallel across
68 | structures.
69 | '''
70 | def test_serialInParallel(self):
71 | '''Tests profiling a set of structures with parallel task execution.'''
72 | process_map(KS2022_randomSolutions.profile,
73 | ['BCC', 'FCC', 'HCP'],
74 | max_workers=3)
75 |
76 | def test_singleInParallel(self):
77 | '''Tests parallel execution profiling works.'''
78 | KS2022_randomSolutions.profile(test='BCC', nIterations=2)
79 |
--------------------------------------------------------------------------------
/pysipfenn/tests/test_Krajewski2020_NN9NN20NN24_ONNX.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import pytest
3 | import os
4 | from pymatgen.core import Structure
5 | from importlib import resources
6 |
7 | import pysipfenn
8 |
9 | IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true" and os.getenv("MODELS_FETCHED") != "true"
10 |
11 | testFile = '0-Cr8Fe18Ni4.POSCAR'
12 | toTest = ['SIPFENN_Krajewski2020_NN9', 'SIPFENN_Krajewski2020_NN20', 'SIPFENN_Krajewski2020_NN24']
13 | referenceEnergies_MxNet = [0.0790368840098381, 0.0498688854277133, 0.0871851742267608]
14 | referenceEnergies_ONNX = [0.0790369734168053, 0.0498689748346806, 0.0871851146221161]
15 |
16 | with resources.files('pysipfenn').joinpath('tests/testCaseFiles/exampleInputFiles/') as exampleInputsDir:
17 | testStructure = Structure.from_file(f'{exampleInputsDir}/{testFile}')
18 |
19 | class TestKrajewski2020ModelsFromONNX(unittest.TestCase):
20 | '''_Requires the NN9/20/24 models to be downloaded first._ It takes the 0-Cr8Fe18Ni4.POSCAR file from the
21 | exampleInputFiles directory and calculates the energy with the NN9/20/24 models. The results are then compared to
22 | the reference results obtained by authors using pySIPFENN (MxNet->ONNX->PyTorch) and SIPFENN (directly in MxNet)
23 | to the 6th decimal place (0.001 meV/atom).
24 | '''
25 | @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test depends on the ONNX network files")
26 | def test_resutls(self):
27 | '''Runs the test.'''
28 | c = pysipfenn.Calculator()
29 | c.calculate_Ward2017(structList=[testStructure])
30 | c.makePredictions(models=c.loadedModels, toRun=toTest, dataInList=c.descriptorData)
31 | for p, name, ref_onnx in zip(c.predictions[0], toTest, referenceEnergies_ONNX):
32 | with self.subTest(msg=f'Predicting vs ONNX with {name:<16}'):
33 | self.assertAlmostEqual(p, ref_onnx, places=6)
34 |
35 | for p, name, ref_mxnet in zip(c.predictions[0], toTest, referenceEnergies_MxNet):
36 | with self.subTest(msg=f'Predicting vs MxNet with {name:<16}'):
37 | self.assertAlmostEqual(p, ref_mxnet, places=6)
38 |
--------------------------------------------------------------------------------
/pysipfenn/tests/test_ModelAdjusters.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import pytest
3 | import os
4 | import pysipfenn
5 | import torch
6 | from importlib import resources
7 |
8 | # Skip the tests if we're in GitHub Actions and the models haven't been fetched yet
9 | IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true" and os.getenv("MODELS_FETCHED") != "true"
10 |
11 | @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test depends on the ONNX network files")
12 | class TestModelAdjusters(unittest.TestCase):
13 | """
14 | Test all model adjusting features that can operate on the Calculator object. Note that this will require
15 | the models to be downloaded and the environment variable MODELS_FETCHED to be set to true if running in GitHub
16 | Actions.
17 |
18 | The setup will load the Krajewski2022_NN30 model and create an ``OPTIMADEAdjuster`` object for testing that is by
19 | default connected to the Materials Project ``OPTIMADE`` server and looks for their GGA+U formation energies. In the
20 | ``testFullRoutine`` test, the adjuster will be used to adjust the model to the Hf-Mo metallic system. The test will
21 | cover almost all adjuster functionalities in different ways to hit all anticipated code paths. It also tests the
22 | ``LocalAdjuster`` class for loading data from CSV and NPY files, which is a parent class of the ``OPTIMADEAdjuster``.
23 | """
24 |
25 | def setUp(self):
26 | """
27 | Initialises the Calculator and ModelAdjuster objects for testing.
28 | """
29 | self.c = pysipfenn.Calculator(autoLoad=False)
30 | self.assertIsNotNone(self.c)
31 | self.c.loadModels("SIPFENN_Krajewski2022_NN30")
32 | self.assertIn('SIPFENN_Krajewski2022_NN30', self.c.loadedModels)
33 |
34 | self.ma = pysipfenn.OPTIMADEAdjuster(self.c, "SIPFENN_Krajewski2022_NN30")
35 |
36 | def testInit(self):
37 | """
38 | Test that the OPTIMADEAdjuster object has been initialized correctly.
39 | """
40 | self.assertEqual(self.ma.modelName, "SIPFENN_Krajewski2022_NN30")
41 | self.assertIsInstance(self.ma.model, torch.nn.Module)
42 | self.assertIsInstance(self.ma.calculator, pysipfenn.Calculator)
43 |
44 | self.assertEqual(len(self.ma.comps), 0)
45 | self.assertEqual(len(self.ma.names), 0)
46 | self.assertEqual(len(self.ma.validationLabels), 0)
47 |
48 | def testPlotExceptions(self):
49 | """
50 | Test that the plot does not plot anything when no data is present.
51 | """
52 | self.assertRaises(AssertionError, self.ma.plotStarting)
53 | self.assertRaises(AssertionError, self.ma.plotAdjusted)
54 |
55 | def testFullRoutine(self):
56 | """
57 | Test the full routine of the adjuster based on the default values pointing to Materials Project. Get the data
58 | using OPTIMADE to adjust the model to Hf-Mo metallic system. Matrix search is reduced to 4 cases to speed up
59 | the test and it is designed to explore all code paths in the search. The test will also check the highlighting
60 | and plotting functionalities of the adjuster.
61 | """
62 | self.ma.fetchAndFeturize(
63 | 'elements HAS "Hf" AND elements HAS "Mo" AND NOT elements HAS ANY "O","C","F","Cl","S"',
64 | parallelWorkers=4)
65 |
66 | self.ma.calculator.writeDescriptorsToCSV("KS2022", "AdjusterTestDescriptors.csv")
67 | self.ma.calculator.writeDescriptorsToNPY("KS2022", "AdjusterTestDescriptors.npy")
68 |
69 | # Check highlighting and no-last-validation plotting
70 | self.ma.highlightPoints([32, 23, 21, 22])
71 | self.ma.plotStarting()
72 |
73 | # Hyperparameter search. The 1e-8 is on purpose, so that the model does not converge and always improves after
74 | # the first epoch.
75 | self.ma.matrixHyperParameterSearch(
76 | learningRates=[1e-8, 1e-3],
77 | optimizers= ["Adam"],
78 | weightDecays=[1e-4, 1e-5],
79 | epochs=10
80 | )
81 |
82 | self.ma.highlightPoints([0, 1, 2, 3])
83 | self.ma.highlightCompositions(["Hf", "Mo", "HfMo", "Hf50 Mo50", "Hf3Mo"])
84 |
85 | self.ma.plotStarting()
86 | self.ma.plotAdjusted()
87 |
88 | # Induce duplicates to test if they are handled
89 | self.ma.fetchAndFeturize(
90 | 'elements HAS "Hf" AND elements HAS "Mo" AND NOT elements HAS ANY "O","C","F","Cl","S"',
91 | parallelWorkers=4)
92 |
93 | self.ma.adjust(
94 | validation=0,
95 | learningRate=1e-4,
96 | epochs=10,
97 | optimizer="Adamax",
98 | weightDecay=1e-4,
99 | lossFunction="MSE"
100 | )
101 |
102 | self.ma.names = []
103 | self.ma.plotStarting()
104 | self.ma.plotAdjusted()
105 |
106 | def testDataLoading(self):
107 | """
108 | Test the data loading functionality of the ``LocalAdjuster`` class (note, ``OPTIMADEAdjuster`` extends it). It
109 | will test loading from both CSV and NPY files exported from the Calculator object. Note that CSV files have
110 | names in the first column and headers in the first row, while NPY files are just the data arrays. It tests
111 | implicit loading from the ``Calculator`` object as well. Lastly, it tests the error raising for unsupported
112 | descriptors and data not matching the descriptor dimensions selected (an optional feature).
113 | """
114 |
115 | with resources.files('pysipfenn').joinpath('tests/testCaseFiles/') as testFileDir:
116 |
117 | # From CSV
118 | self.lma1 = pysipfenn.LocalAdjuster(
119 | self.c,
120 | model="SIPFENN_Krajewski2022_NN30",
121 | descriptorData=str(testFileDir.joinpath("AdjusterTestDescriptors.csv")),
122 | targetData=str(testFileDir.joinpath("AdjusterTestTargets.csv")),
123 | descriptor="KS2022"
124 | )
125 | assert self.lma1 is not None
126 | assert len(self.lma1.descriptorData) > 0
127 | assert len(self.lma1.targetData) > 0
128 | del self.lma1
129 |
130 | # From NPY
131 | self.lma2 = pysipfenn.LocalAdjuster(
132 | self.c,
133 | model="SIPFENN_Krajewski2022_NN30",
134 | descriptorData=str(testFileDir.joinpath("AdjusterTestDescriptors.npy")),
135 | targetData=str(testFileDir.joinpath("AdjusterTestTargets.npy")),
136 | descriptor="KS2022"
137 | )
138 | assert self.lma2 is not None
139 | assert len(self.lma2.descriptorData) > 0
140 | assert len(self.lma2.targetData) > 0
141 |
142 | self.c.descriptorData = self.lma2.descriptorData
143 |
144 | del self.lma2
145 |
146 | # Implicit, from the Calculator
147 | self.lma3 = pysipfenn.LocalAdjuster(
148 | self.c,
149 | targetData=str(testFileDir.joinpath("AdjusterTestTargets.csv")),
150 | model="SIPFENN_Krajewski2022_NN30",
151 | descriptor="KS2022",
152 | )
153 |
154 | # Error raising
155 | with self.assertRaises(AssertionError):
156 | self.lma4 = pysipfenn.LocalAdjuster(
157 | self.c,
158 | targetData=str(testFileDir.joinpath("AdjusterTestTargets.csv")),
159 | model="SIPFENN_Krajewski2022_NN30",
160 | descriptor="Ward2017",
161 | )
162 |
163 | with self.assertRaises(NotImplementedError):
164 | self.lma5 = pysipfenn.LocalAdjuster(
165 | self.c,
166 | targetData=str(testFileDir.joinpath("AdjusterTestTargets.csv")),
167 | model="SIPFENN_Krajewski2022_NN30",
168 | descriptor="SomeCrazyDescriptor",
169 | )
170 |
171 | def testEndpointOverride(self):
172 | """
173 | Test the endpoint override functionality of the ``OPTIMADEAdjuster`` class. It will test the override of the
174 | endpoint and the data fetching from the new endpoint.
175 | """
176 | endpoint = ["https://alexandria.icams.rub.de/pbesol"]
177 | targetPath = ['attributes', '_alexandria_formation_energy_per_atom']
178 |
179 | self.ma2 = pysipfenn.OPTIMADEAdjuster(
180 | self.c,
181 | model="SIPFENN_Krajewski2022_NN30",
182 | endpointOverride=endpoint,
183 | targetPath=targetPath)
184 |
185 | self.ma2.fetchAndFeturize(
186 | 'elements HAS "Hf" AND elements HAS "Mo" AND elements HAS "Zr"',
187 | parallelWorkers=2)
188 |
189 | self.assertGreater(len(self.ma2.comps), 0, "No compositions were found, thus no data was fetched.")
190 | self.assertGreater(len(self.ma2.names), 0, "No names were found, thus no data was fetched.")
191 | self.assertGreater(
192 | len(self.ma2.descriptorData), 0,
193 | "No descriptor data was found. If the other asserts passed, this is likely a bug in the featurization "
194 | "or structural data has been made incompatible or otherwise corrupted.")
195 |
196 | for ref in self.ma2.references:
197 | self.assertGreater(len(ref), 0, "No references were found for the datapoint despite Alexendria being used and having them for this test case as of writing this (and very likely into the future).")
--------------------------------------------------------------------------------
/pysipfenn/tests/test_ModelExporters.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import pytest
3 | import os
4 | import pysipfenn
5 |
6 | # Skip the tests if we're in GitHub Actions and the models haven't been fetched yet
7 | IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true" and os.getenv("MODELS_FETCHED") != "true"
8 |
9 |
10 | class TestExporters(unittest.TestCase):
11 | '''Test all model exporting features that can operate on the Calculator object. Note that this will require
12 | the models to be downloaded and the environment variable MODELS_FETCHED to be set to true if running in GitHub
13 | Actions.
14 | '''
15 |
16 | def setUp(self):
17 | '''Initialise the Calculator object for testing.'''
18 | self.c = pysipfenn.Calculator()
19 | self.assertIsNotNone(self.c)
20 |
21 | def testInit(self):
22 | '''Test that the Calculator object is initialised correctly.'''
23 | self.assertEqual(self.c.predictions, [])
24 | self.assertEqual(self.c.toRun, [])
25 | self.assertEqual(self.c.descriptorData, [])
26 | self.assertEqual(self.c.inputFiles, [])
27 |
28 | def testExceptions1(self):
29 | '''Test that the exceptions are raised correctly by the exporters when the Calculator is empty. Regardless of the
30 | model presence, it will skip the automatic loading of models to pretend it is a fresh install.
31 | '''
32 | c = pysipfenn.Calculator(autoLoad=False)
33 |
34 | with self.assertRaises(AssertionError,
35 | msg='ONNXExporter did not raise an AssertionError on empty Calculator'):
36 | onnxexp = pysipfenn.ONNXExporter(c)
37 | with self.assertRaises(AssertionError,
38 | msg='TorchExporter did not raise an AssertionError on empty Calculator'):
39 | torchexp = pysipfenn.TorchExporter(c)
40 | with self.assertRaises(AssertionError,
41 | msg='CoreMLExporter did not raise an AssertionError on empty Calculator'):
42 | coremlexp = pysipfenn.CoreMLExporter(c)
43 |
44 | @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test depends on the ONNX network files")
45 | def testExceptions2(self):
46 | '''Test that the exceptions are raised correctly by the exporters when the models are loaded, but the
47 | descriptor they are trying to use is not defined in the exporter.
48 | '''
49 | self.assertIn('SIPFENN_Krajewski2020_NN24', self.c.models.keys(),
50 | 'This test requires the SIPFENN_Krajewski2020_NN24 model to be downloaded and loaded in the'
51 | 'Calculator object.')
52 | with self.assertRaises(KeyError,
53 | msg='Not loaded models tried to pass silently.'):
54 | self.c.models['NotLoadedModel']['descriptor'] = 'NotAnImplementedDescriptor'
55 |
56 | self.c.models['SIPFENN_Krajewski2020_NN24']['descriptor'] = 'NotAnImplementedDescriptor'
57 |
58 | with self.assertRaises(NotImplementedError,
59 | msg='TorchExporter did not raise an NotImplementedError on undefined descriptor'):
60 | torchexp = pysipfenn.TorchExporter(self.c)
61 | torchexp.export('SIPFENN_Krajewski2020_NN24')
62 |
63 | with self.assertRaises(NotImplementedError,
64 | msg='CoreMLExporter did not raise an NotImplementedError on undefined descriptor'):
65 | coremlexp = pysipfenn.CoreMLExporter(self.c)
66 | coremlexp.export('SIPFENN_Krajewski2020_NN24')
67 |
68 | with self.assertRaises(NotImplementedError,
69 | msg='ONNXExporter did not raise an NotImplementedError on undefined descriptor'):
70 | onnxexp = pysipfenn.ONNXExporter(self.c)
71 | onnxexp.export('SIPFENN_Krajewski2020_NN24')
72 |
73 | @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test depends on the ONNX network files")
74 | def testModelsLoaded(self):
75 | '''Test that the models are loaded correctly.'''
76 | assert self.c.loadedModels.__len__() > 0, 'No models loaded in calculator. Nothing to export.'
77 | self.assertEqual(set(self.c.network_list_available), set(self.c.loadedModels.keys()))
78 |
79 | @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test depends on the ONNX network files")
80 | def testONNXSimplify(self):
81 | '''Test that the ONNX simplification works with all models with no errors.'''
82 | self.onnxexp = pysipfenn.ONNXExporter(self.c)
83 | assert self.onnxexp.calculator == self.c
84 | assert self.onnxexp.simplifiedDict == {model: False for model in self.c.loadedModels.keys()}
85 |
86 | self.onnxexp.simplifyAll()
87 | assert self.onnxexp.simplifiedDict == {model: True for model in self.c.loadedModels.keys()}
88 |
89 | @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test depends on the ONNX network files")
90 | def testONNXFP16(self):
91 | '''Test that the ONNX FP16 conversion works with all models with no errors.'''
92 | self.onnxexp = pysipfenn.ONNXExporter(self.c)
93 | assert self.onnxexp.calculator == self.c
94 | assert self.onnxexp.fp16Dict == {model: False for model in self.c.loadedModels.keys()}
95 |
96 | self.onnxexp.toFP16All()
97 | assert self.onnxexp.fp16Dict == {model: True for model in self.c.loadedModels.keys()}
98 |
99 | @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test depends on the ONNX network files")
100 | def testONNXExport(self):
101 | '''Test that the ONNX export works with all models with no errors. For two of the models, the export will
102 | also simplify or convert to FP16 to check that it gets correctly encoded in the exported file name.
103 | '''
104 | self.onnxexp = pysipfenn.ONNXExporter(self.c)
105 | assert self.onnxexp.calculator == self.c
106 |
107 | self.onnxexp.simplify('SIPFENN_Krajewski2020_NN9')
108 | self.onnxexp.toFP16('SIPFENN_Krajewski2020_NN24')
109 |
110 | self.onnxexp.exportAll()
111 |
112 | @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test depends on the ONNX network files")
113 | def testTorchExport(self):
114 | '''Test that the PyTorch export works with all models with no errors. Please note that if you are using
115 | custom descriptors, you will need to add them to the exporter definition in pysipfenn/core/modelExporters.py.
116 | '''
117 | self.torchexp = pysipfenn.TorchExporter(self.c)
118 | assert self.torchexp.calculator == self.c
119 |
120 | self.torchexp.exportAll()
121 |
122 | @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test depends on the ONNX network files")
123 | def testCoreMLExport(self):
124 | '''Test that the CoreML export works with all models with no errors. Please note that if you are using
125 | custom descriptors, you will need to add them to the exporter definition in pysipfenn/core/modelExporters.py.
126 | '''
127 | self.coremlexp = pysipfenn.CoreMLExporter(self.c)
128 | assert self.coremlexp.calculator == self.c
129 |
130 | self.coremlexp.exportAll()
131 |
--------------------------------------------------------------------------------
/pysipfenn/tests/test_Ward2017.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | import csv
3 | import os
4 | from pymatgen.core import Structure
5 | from tqdm import tqdm
6 | import numpy as np
7 | from natsort import natsorted
8 | from importlib import resources
9 |
10 | from pysipfenn.descriptorDefinitions import Ward2017
11 |
12 |
13 | class TestWard2017(unittest.TestCase):
14 | '''Tests the correctness of the KS2022 descriptor generation function by comparing the results to the reference data
15 | for the first 5 structures in the exampleInputFiles directory, stored in the exampleInputFilesDescriptorTable.csv.
16 | '''
17 | def setUp(self):
18 | '''Reads the reference data from the exampleInputFilesDescriptorTable.csv file and the labels from the first
19 | row of that file. Then it reads the first 5 structures from the exampleInputFiles directory and generates the
20 | descriptors for them. The results are stored in the functionOutput list. It also persists the test results in
21 | the Ward2017_TestResult.csv file.
22 | '''
23 | with resources.files('pysipfenn'). \
24 | joinpath('tests/testCaseFiles/exampleInputFilesDescriptorTable.csv').open('r', newline='') as f:
25 | reader = csv.reader(f)
26 | self.referenceDescriptorTable = list(reader)
27 |
28 | self.labels = self.referenceDescriptorTable[0]
29 | self.testReferenceData = np.float_(self.referenceDescriptorTable[1:]).tolist()
30 | self.skipLabels = ['mean_WCMagnitude_Shell3']
31 |
32 | with resources.files('pysipfenn').joinpath('tests/testCaseFiles/exampleInputFiles/') as exampleInputsDir:
33 | self.exampleInputFiles = natsorted(os.listdir(exampleInputsDir))
34 | self.testStructures = [Structure.from_file(f'{exampleInputsDir}/{eif}') for eif in self.exampleInputFiles]
35 |
36 | self.functionOutput = [Ward2017.generate_descriptor(s).tolist() for s in tqdm(self.testStructures[:5])]
37 | with resources.files('pysipfenn'). \
38 | joinpath('tests/Ward2017_TestResult.csv').open('w+', newline='') as f:
39 | f.writelines([f'{v}\n' for v in self.functionOutput[0]])
40 |
41 | def test_resutls(self):
42 | '''Compares the results of the Ward2017 descriptor generation function to the reference data on a field-by-field
43 | basis by requiring the absolute difference to be less than 1e-6.'''
44 | for fo, trd, name in zip(self.functionOutput, self.testReferenceData, self.exampleInputFiles):
45 | for p_fo, p_trd, l in zip(fo, trd, self.labels):
46 | if l not in self.skipLabels:
47 | with self.subTest(msg=f'Testing {l} calculated for {name}'):
48 | self.assertAlmostEqual(p_fo, p_trd, places=6)
49 |
50 | def test_cite(self):
51 | """Tests citation return."""
52 | citation = Ward2017.cite()
53 | self.assertIn("Krajewski", citation[0])
54 | self.assertIn("Ward", citation[1])
55 |
56 |
57 | class TestWard2017Profiling(unittest.TestCase):
58 | '''Test the Ward2017 descriptor generation by profiling the execution time of the descriptor generation function
59 | for two example structures (JVASP-10001 and diluteNiAlloy).
60 | '''
61 | def test_serial(self):
62 | '''Test the serial execution of the descriptor generation function 4 times for each of the two examples.'''
63 | Ward2017.profile(test='JVASP-10001', nRuns=4)
64 | Ward2017.profile(test='diluteNiAlloy', nRuns=4)
65 |
66 | def test_parallel(self):
67 | '''Test the parallel execution of the descriptor generation function 24 times for each of the two examples
68 | but in parallel with up to 8 workers to speed up the execution.
69 | '''
70 | Ward2017.profileParallel(test='JVASP-10001', nRuns=24)
71 | Ward2017.profileParallel(test='diluteNiAlloy', nRuns=24)
72 |
--------------------------------------------------------------------------------
/pysipfenn/tests/test_customModel.py:
--------------------------------------------------------------------------------
1 | import unittest
2 | from pymatgen.core import Structure
3 | from importlib import resources
4 | import shutil
5 | import pysipfenn
6 | import pytest
7 | import os
8 |
9 | IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true" and os.getenv("MODELS_FETCHED") != "true"
10 |
11 |
12 | class TestCustomModel(unittest.TestCase):
13 | '''_Requires the models to be downloaded first._ Test loading a custom model by copying the Krajewski2020_NN24
14 | model to the current directory and loading it from there instead of the default location.
15 | '''
16 |
17 | @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test depends on the ONNX network files")
18 | def setUp(self) -> None:
19 | '''Copies the model to CWD.'''
20 | with open(resources.files('pysipfenn').joinpath('modelsSIPFENN/SIPFENN_Krajewski2020_NN24.onnx'),
21 | 'rb') as modelForTest:
22 | with open('MyFunNet.onnx', 'wb') as modelForTestCopy:
23 | shutil.copyfileobj(modelForTest, modelForTestCopy)
24 | self.assertTrue(os.path.isfile('MyFunNet.onnx'))
25 | print('Copied model to current directory')
26 | self.c = pysipfenn.Calculator()
27 | print(self.c.network_list_available)
28 | print('Setup complete')
29 |
30 | @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test depends on the ONNX network files")
31 | def testCalculation(self):
32 | '''Loads the model as custom, runs the calculation and compares the results to the original model results
33 | field by field.
34 | '''
35 | self.c.loadModelCustom(networkName='MyFunNet',
36 | modelName='MyFunNetName',
37 | descriptor='Ward2017',
38 | modelDirectory='.')
39 | print(self.c.network_list_available)
40 | testFilesDir = resources.files('pysipfenn').joinpath('tests/testCaseFiles/exampleInputFiles/')
41 | self.c.runFromDirectory(directory=testFilesDir,
42 | descriptor='Ward2017',
43 | mode='serial')
44 | for p in self.c.get_resultDictsWithNames()[:3]:
45 | self.assertIn('MyFunNet', p.keys())
46 | self.assertAlmostEqual(p['MyFunNet'], p['SIPFENN_Krajewski2020_NN24'], places=9)
47 |
48 | @pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test depends on the ONNX network files")
49 | def tearDown(self) -> None:
50 | '''Deletes the copied model.'''
51 | self.c = None
52 | print('\nTearing down')
53 | os.remove('MyFunNet.onnx')
54 | print('Removed MyFunNet')
55 |
--------------------------------------------------------------------------------