Basic Workflow¶
This tutorial walks through the typical end-to-end workflow in CGAspects: importing simulation data, visualising the crystal, running an analysis, and exporting results.
Step 1 — Import XYZ Data¶
- Launch CGAspects (
cgaspects) - Click Import XYZ Files in the left panel, or use File → Import (
Ctrl+I) - Browse to the folder containing your CrystoGen XYZ output files
- Click Open
CGAspects scans the folder and loads all XYZ files. The 3D viewport updates to show the first crystal frame.
Tip
If your folder contains a CrystoGen structure file, lattice parameters are loaded automatically.
Step 2 — Explore the 3D Visualisation¶
- Orbit: Left-click and drag to rotate the crystal
- Zoom: Scroll the mouse wheel
- Press
Rto reset the view at any time
The Crystal Info panel on the right shows the aspect ratios, shape, volume, and surface area of the displayed frame.
If multiple XYZ frames were loaded, use the frame slider at the bottom to navigate between them, or press Play to animate the trajectory.
Step 3 — (Optional) Set Lattice Parameters¶
If you want to use Miller indices for planes or fractional indices for directions:
- Open Crystallography → Set Lattice Parameters
- Enter your unit cell parameters (a, b, c, α, β, γ), or click Load CIF to import from a CIF file
- Click OK
Step 4 — (Optional) Add Crystallographic Planes and Directions¶
Add a Plane¶
- Open Crystallography → Add Planes (
Ctrl+Shift+L) - Select Miller mode and enter h, k, l values (e.g.,
1 0 0) - Click Add Plane
The plane appears as a semi-transparent quad over the crystal.
Add a Direction¶
- Open Crystallography → Add Directions (
Ctrl+Shift+D) - Select Fractional mode and enter [u v w] values (e.g.,
1 0 0) - Choose a rendering style (Arrow is recommended)
- Click Add Direction
Step 5 — Run an Analysis¶
Choose the analysis appropriate for your data:
| Button | When to Use |
|---|---|
| Calculate Aspect Ratio | You want shape metrics and Zingg classification |
| Calculate Growth Rates | You have time-series size data |
| Calculate Site Analysis | You have crystallization event files |
Click the button. A configuration dialog opens — accept defaults or adjust options. Click OK.
The analysis runs in the background. A progress bar appears in the status bar.
Step 6 — Explore Results in the Plotting Dialog¶
When the analysis completes, the Plotting Dialog opens automatically with the results.
- Use the X / Y / Colour by dropdowns to choose what to plot
- Add a trendline if needed
- Use the Filter button to focus on a subset of data
- Add custom Labels for the title and axes
Step 7 — Export¶
Export Plot¶
Click Save in the plot navigation toolbar. Choose PNG, PDF, or EPS. Plots are also auto-saved to aspects_output/CGPlots/.
Export Analysis Data¶
CSV files are automatically saved in aspects_output/ when the analysis completes.
Render the 3D Viewport¶
Press Ctrl+R or use File → Render to save the current 3D view as a PNG.
Export Point Cloud¶
Use File → Export XYZ (Ctrl+Shift+E) to save the current point cloud as an XYZ file.