Calculated Properties¶
Complex calculated properties can be associated with some crystal structure entries. These properties may take a long time to generate and therefore have been pre-calculated, and their results will have been stored in the CSD for fast retrieval and search.
The calculated_properties
class contains the calculated properties associated with a ccdc.entry
object.
Those entries that do not have calculated properties associated will return None:
Pore Analyser Calculated Properties¶
Pore Analyser is a tool that can be used to calculate the properties of pores in crystal structures. It has been applied to the polymeric, typically metal organic framework, structures in the CSD. These structures will have calculated properties associated with them, which will contain pore_analyser calculations. These can be accessed as follows:
>>> entry = entry_reader.entry('AKUKUO')
>>> calculated_properties = entry.calculated_properties
>>> type(calculated_properties)
<class 'ccdc.entry.CrystalCalculatedProperties'>
>>> pore_analyser = calculated_properties.pore_analyser
>>> type(pore_analyser)
<class 'ccdc.descriptors.CrystalDescriptors.PoreAnalyser'>
The pore_analyser object is a ccdc.descriptors.CrystalDescriptors.PoreAnalyser
object, which contains pre-calculated values for some of its properties.
The following pore analyser properties are stored in the CSD:
ccdc.descriptors.CrystalDescriptors.PoreAnalyser.total_surface_area
ccdc.descriptors.CrystalDescriptors.PoreAnalyser.total_geometric_volume
ccdc.descriptors.CrystalDescriptors.PoreAnalyser.pore_limiting_diameter
ccdc.descriptors.CrystalDescriptors.PoreAnalyser.max_pore_diameter
ccdc.descriptors.CrystalDescriptors.PoreAnalyser.num_percolated_dimensions
Other properties are available in the ccdc.descriptors.CrystalDescriptors.PoreAnalyser
class, and can be accessed as described in the documentation for that class.
These properties will be calculated when the property is called, which can be computationally expensive.
The individal properties can be accessed as follows:
>>> print(round(pore_analyser.total_surface_area, 2))
58.51
>>> print(round(pore_analyser.total_geometric_volume, 2))
565.81
>>> print(round(pore_analyser.pore_limiting_diameter, 2))
4.25
>>> print(round(pore_analyser.max_pore_diameter, 2))
4.81
>>> print(pore_analyser.num_percolated_dimensions)
1
Pore Analyser Property Search¶
The Pore Analyser properties can be searched using the ccdc.search.TextNumericSearch
class.
The following example demonstrates how to search for structures with a pore limiting diameter of between 5.0 and 6.0 Angstroms:
>>> search = search.TextNumericSearch()
>>> search.add_pore_analysis_pore_limiting_diameter((5.0, 6.0))
>>> search_results = search.search(max_hit_structures=20)
>>> len(search_results) == 20
True
>>> hit = next((h for h in search_results if h.identifier=='AFOWOK'), None)
>>> print(round(hit.entry.calculated_properties.pore_analyser.pore_limiting_diameter, 2))
5.35