composition¶
- property Structure.composition: Dict[str, int]¶
Return the composition of the structure as a dictionary.
- Returns:
Dict[str, int] – A mapping where keys are the unique atomic species in self.atoms and values are their counts.
Examples
>>> self.atoms = ['Ba', 'Ba', 'Cu', 'Cu', 'Cu', 'O', 'O'] >>> self.composition {'Ba': 2, 'Cu': 3, 'O': 2}