Plugins
Grain Segmentation
Segment polycrystalline regions by grouping atoms with compatible orientations.
Overview
Grain Segmentation is best understood as an orientation-based grouping workflow. It uses PTM-derived orientation information to separate crystalline domains that belong to different grains, then reports grain-level properties such as size, centroid, and representative orientation.
This makes it especially useful in polycrystalline systems, coherent-interface problems, and workflows where you want to move from atom-level structure labels to grain-level organization.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
rmsd | float | 0.1 | RMSD threshold for PTM structure identification. |
minGrainAtomCount | int | 100 | Minimum number of atoms required to keep a grain. |
adoptOrphanAtoms | bool | true | Exposed in the interface, but the current implementation does not visibly perform a dedicated orphan-adoption phase. |
handleCoherentInterfaces | bool | true | Handle coherent interfaces between compatible structures. |
outputBonds | bool | false | Exposed parameter; bond output is not currently surfaced as a documented result file. |
Practical notes
- This plugin depends strongly on PTM-style orientation information.
- It is closer to "separate differently oriented crystalline regions" than to "detect all grain boundaries geometrically."
- In addition to grain listings, the implementation also exports grouped atoms data.
Output
{outputBase}_grains.msgpack
type Vec3 = [float, float, float];
type Quaternion = [float, float, float, float];
interface Grain {
id: int;
size: int;
orientation: Quaternion;
pos: Vec3;
}
interface GrainSegmentationOutput {
main_listing: {
total_grains: int;
merging_threshold: float;
};
sub_listings: {
grains: Grain[];
};
}{outputBase}_atoms.msgpack
Atoms grouped by identified structure family for downstream visualization.
See Also
- OpenDXA — dislocation-network reconstruction in crystalline systems
- Structure Identification — the structural groundwork this plugin depends on