File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed
scripts/november_2023_morphology_webinar Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 1- # Put title here
1+ # Working with morphologies and CSD-Particle
22
33This is a collection of scripts from the November 2023 CCDC Webinar on crystal morphologies, presented by Dr Andrew G.
44P. Maloney.
@@ -14,12 +14,8 @@ This folder contains the following scripts:
1414 Calculates the VisualHabit morphology of ` IBPRAC18 ` (ibuprofen) and descriptors for the (100) surface. Also calculates
1515 particle rugosity.
1616- ` morphology_plot.py `
17- Contains a function to generate a 3D plot of a crystal morphology using Matplotlib.
18- - ` morphology_shape_classification `
19- Contains a definition of the ` ShapeClassifier ` class, which is used to calculate particle shape. This script also
20- contains functions to generate Zingg plots.
21- - ` shape_classification.py `
22- Runs an example of the usage of the ` ShapeClassifier ` class using the structure ` SUCACB02 ` .
17+ Contains a function to generate a 3D plot of a crystal morphology using Matplotlib. Running the script will plot the
18+ BFDH morphology of ` IBPRAC18 ` (ibuprofen).
2319
2420## Requirements
2521
@@ -30,6 +26,12 @@ Python API.
3026
3127- CSD-Core, CSD-Particle
3228
29+ ## Usage
30+
31+ Each script can be run independently from the command line:
32+
33+ ` python script_name.py `
34+
3335### Author
3436
3537Pietro Sacchi
Original file line number Diff line number Diff line change @@ -45,3 +45,13 @@ def generate_morphology_plot(morphology, labels=None):
4545 s = 10 ,
4646 color = 'black' )
4747 plt .show ()
48+
49+
50+ if __name__ == "__main__" :
51+ from ccdc .io import EntryReader
52+ from ccdc .morphology import BFDHMorphology
53+
54+ csd = EntryReader ('CSD' )
55+ ibuprofen = csd .crystal ("IBPRAC18" )
56+ bfdh_morphology = BFDHMorphology (ibuprofen )
57+ generate_morphology_plot (bfdh_morphology )
You can’t perform that action at this time.
0 commit comments