diff --git a/mdonatello/properties.py b/mdonatello/properties.py index 2e8a205..c189065 100644 --- a/mdonatello/properties.py +++ b/mdonatello/properties.py @@ -286,6 +286,37 @@ def property_value(self) -> float: return len(Chem.FindMolChiralCenters(self.mol)) +class AllAtoms(Property): + """A class for calculating the amount of atoms of a molecule. + + Parameters: + ----------- + mol : Chem.Mol + The RDKit Mol object of the molecule for which the heavy atom count is being calculated. + + Returns: + -------- + float + The atom count of the molecule. + """ + + name = "Heavy Atoms" + values_format = False + unit = "" + + @cached_property + def property_value(self) -> float: + """ + Calculates the heavy atoms of the molecule. + + Returns: + -------- + float + The atom count of the molecule. + """ + return rdMolDescriptors.CalcNumAtoms(self.mol) + + class HeavyAtoms(Property): """A class for calculating the amount of heavy atoms of a molecule.