A list describing the species of the sites of this structure. Species can represent pure chemical elements, virtual-crystal atoms representing a statistical occupation of a given site by multiple chemical elements, and/or a location to which there are attached atoms, i.e., atoms whose p
| 63 | |
| 64 | |
| 65 | class Species(BaseModel): |
| 66 | """A list describing the species of the sites of this structure. |
| 67 | |
| 68 | Species can represent pure chemical elements, virtual-crystal atoms representing a |
| 69 | statistical occupation of a given site by multiple chemical elements, and/or a |
| 70 | location to which there are attached atoms, i.e., atoms whose precise location are |
| 71 | unknown beyond that they are attached to that position (frequently used to indicate |
| 72 | hydrogen atoms attached to another element, e.g., a carbon with three attached |
| 73 | hydrogens might represent a methyl group, -CH3). |
| 74 | |
| 75 | - **Examples**: |
| 76 | - `[ {"name": "Ti", "chemical_symbols": ["Ti"], "concentration": [1.0]} ]`: any site with this species is occupied by a Ti atom. |
| 77 | - `[ {"name": "Ti", "chemical_symbols": ["Ti", "vacancy"], "concentration": [0.9, 0.1]} ]`: any site with this species is occupied by a Ti atom with 90 % probability, and has a vacancy with 10 % probability. |
| 78 | - `[ {"name": "BaCa", "chemical_symbols": ["vacancy", "Ba", "Ca"], "concentration": [0.05, 0.45, 0.5], "mass": [0.0, 137.327, 40.078]} ]`: any site with this species is occupied by a Ba atom with 45 % probability, a Ca atom with 50 % probability, and by a vacancy with 5 % probability. The mass of this site is (on average) 88.5 a.m.u. |
| 79 | - `[ {"name": "C12", "chemical_symbols": ["C"], "concentration": [1.0], "mass": [12.0]} ]`: any site with this species is occupied by a carbon isotope with mass 12. |
| 80 | - `[ {"name": "C13", "chemical_symbols": ["C"], "concentration": [1.0], "mass": [13.0]} ]`: any site with this species is occupied by a carbon isotope with mass 13. |
| 81 | - `[ {"name": "CH3", "chemical_symbols": ["C"], "concentration": [1.0], "attached": ["H"], "nattached": [3]} ]`: any site with this species is occupied by a methyl group, -CH3, which is represented without specifying precise positions of the hydrogen atoms. |
| 82 | |
| 83 | """ |
| 84 | |
| 85 | name: Annotated[ |
| 86 | str, |
| 87 | OptimadeField( |
| 88 | description="""Gives the name of the species; the **name** value MUST be unique in the `species` list.""", |
| 89 | support=SupportLevel.MUST, |
| 90 | queryable=SupportLevel.OPTIONAL, |
| 91 | ), |
| 92 | ] |
| 93 | |
| 94 | chemical_symbols: Annotated[ |
| 95 | list[ChemicalSymbol], |
| 96 | OptimadeField( |
| 97 | description="""MUST be a list of strings of all chemical elements composing this species. Each item of the list MUST be one of the following: |
| 98 | |
| 99 | - a valid chemical-element symbol, or |
| 100 | - the special value `"X"` to represent a non-chemical element, or |
| 101 | - the special value `"vacancy"` to represent that this site has a non-zero probability of having a vacancy (the respective probability is indicated in the `concentration` list, see below). |
| 102 | |
| 103 | If any one entry in the `species` list has a `chemical_symbols` list that is longer than 1 element, the correct flag MUST be set in the list `structure_features`.""", |
| 104 | support=SupportLevel.MUST, |
| 105 | queryable=SupportLevel.OPTIONAL, |
| 106 | ), |
| 107 | ] |
| 108 | |
| 109 | concentration: Annotated[ |
| 110 | list[float], |
| 111 | OptimadeField( |
| 112 | description="""MUST be a list of floats, with same length as `chemical_symbols`. The numbers represent the relative concentration of the corresponding chemical symbol in this species. The numbers SHOULD sum to one. Cases in which the numbers do not sum to one typically fall only in the following two categories: |
| 113 | |
| 114 | - Numerical errors when representing float numbers in fixed precision, e.g. for two chemical symbols with concentrations `1/3` and `2/3`, the concentration might look something like `[0.33333333333, 0.66666666666]`. If the client is aware that the sum is not one because of numerical precision, it can renormalize the values so that the sum is exactly one. |
| 115 | - Experimental errors in the data present in the database. In this case, it is the responsibility of the client to decide how to process the data. |
| 116 | |
| 117 | Note that concentrations are uncorrelated between different site (even of the same species).""", |
| 118 | support=SupportLevel.MUST, |
| 119 | queryable=SupportLevel.OPTIONAL, |
| 120 | ), |
| 121 | ] |
| 122 |
nothing calls this directly
no test coverage detected