diff --git a/scripts/refcodes_with_properties/entry_property_calculator.py b/scripts/refcodes_with_properties/entry_property_calculator.py index aa1ee9f..a6d6784 100644 --- a/scripts/refcodes_with_properties/entry_property_calculator.py +++ b/scripts/refcodes_with_properties/entry_property_calculator.py @@ -411,6 +411,25 @@ def value(self, entry): register(ZPrimeFilter) +class AsymmUnitFilter(_RangeFilter): + def __init__(self, args): + super().__init__(args) + + @staticmethod + def name(): + return "asymmetric unit components" + + @staticmethod + def helptext(): + return "specify range of components in the asymmetric unit" + + def value(self, entry): + return len(entry.crystal.asymmetric_unit_molecule.components) + + +register(AsymmUnitFilter) + + class RfactorFilter(_RangeFilter): def __init__(self, args): super().__init__(args)