We want to extend the information about the ions used in the absorber layer in the perovskite database entries with the information that @Jesperkemist. These are my current thoughts.
[ ] Create a new sub_section called Ion containing information about the components of the absorber. The sub_section should be repeated under the perovskite subsection of the database. This section should likely inherit from PureSubstance.
[ ] An additional quantities should include information from the tables including:
perovskite_ion_type Enum( A, B, X).
ion_charge
[ ] The normalizer of the section should look at the ions in the perovskite section and create the instances of the Ion section.
[ ] Create a nomad System with an atoms subsection (something along the lines below). The atoms could be created from the smiles of the organic cations with RDkit. Some example code could go in this direction:
def normalize(self, archive, logger: None) -> None:
super().normalize(archive, logger)
from rdkit import Chem
from rdkit.Chem import AllChem
from nomad.normalizing.common import nomad_atoms_from_ase_atoms
from nomad.normalizing.topology import add_system, add_system_info
from nomad.atomutils import Formula
from ase.io import read
if self.smile:
# generate the 3D structure from the SMILE
ase_atoms = optimize_molecule(self.smile)
atoms = nomad_atoms_from_ase_atoms(ase_atoms)
# let's plug this into the results section in the archive
if not archive.results.material:
archive.results.material = Material()
system = System(atoms=atoms, system_id='results/material/topology/0', label='original') # populate additional quantities here
add_system_info(system, None)
archive.results.material.topology = [system]
# Let's also add the formula information and augment it with the Formula class
if ase_atoms is not None:
formula = Formula(ase_atoms.get_chemical_formula())
formula.populate(archive.results.material.topology)
Should populate results.material.topology with the created system as a flat list:
first cation --> results.material.topology.0
second_cation --> results.material.topology.1
We want to extend the information about the ions used in the absorber layer in the perovskite database entries with the information that @Jesperkemist. These are my current thoughts.
[ ] Create a new sub_section called
Ion
containing information about the components of the absorber. The sub_section should be repeated under theperovskite
subsection of the database. This section should likely inherit fromPureSubstance
.Information about the ions can be found under:
[ ] An additional quantities should include information from the tables including:
perovskite_ion_type
Enum( A, B, X).ion_charge
[ ] The normalizer of the section should look at the ions in the
perovskite
section and create the instances of theIon
section.[ ] Create a nomad
System
with an atoms subsection (something along the lines below). The atoms could be created from the smiles of the organic cations with RDkit. Some example code could go in this direction:Should populate
results.material.topology
with the created system as a flat list: first cation -->results.material.topology.0
second_cation -->results.material.topology.1