Skip to content

Commit ed65c9c

Browse files
authored
Merge pull request #81 from ccdc-opensource/asymmetric_unit_search
Added range filter for number of components in asymmetric unit NO_JIRA
2 parents 542bd44 + dc98e0c commit ed65c9c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

scripts/refcodes_with_properties/entry_property_calculator.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,25 @@ def value(self, entry):
411411
register(ZPrimeFilter)
412412

413413

414+
class AsymmUnitFilter(_RangeFilter):
415+
def __init__(self, args):
416+
super().__init__(args)
417+
418+
@staticmethod
419+
def name():
420+
return "asymmetric unit components"
421+
422+
@staticmethod
423+
def helptext():
424+
return "specify range of components in the asymmetric unit"
425+
426+
def value(self, entry):
427+
return len(entry.crystal.asymmetric_unit_molecule.components)
428+
429+
430+
register(AsymmUnitFilter)
431+
432+
414433
class RfactorFilter(_RangeFilter):
415434
def __init__(self, args):
416435
super().__init__(args)

0 commit comments

Comments
 (0)