From dc98e0c80b995e4ba4862d764914c3cb7f3168af Mon Sep 17 00:00:00 2001 From: Pablo Martinez Bulit Date: Thu, 26 Jun 2025 09:03:55 +0100 Subject: [PATCH] Added range filter for number of components in asymmetric unit NO_JIRA --- .../entry_property_calculator.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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)