https://github.com/voltlabs-research/grain-segmentation
Algorithms for detects and segments grain boundaries in polycrystalline materials. Identifies individual grains, computes grain orientations, and extracts grain boundary networks from atomistic simulations.
https://github.com/voltlabs-research/grain-segmentation
lammps materials-science molecular-dynamics simulations
Last synced: 5 days ago
JSON representation
Algorithms for detects and segments grain boundaries in polycrystalline materials. Identifies individual grains, computes grain orientations, and extracts grain boundary networks from atomistic simulations.
- Host: GitHub
- URL: https://github.com/voltlabs-research/grain-segmentation
- Owner: VoltLabs-Research
- License: mit
- Created: 2026-02-05T07:52:55.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-06-08T00:22:04.000Z (5 days ago)
- Last Synced: 2026-06-08T01:20:54.983Z (5 days ago)
- Topics: lammps, materials-science, molecular-dynamics, simulations
- Language: C++
- Homepage: https://docs.voltcloud.dev/docs/plugins/grain-segmentation
- Size: 85.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GrainSegmentation
`GrainSegmentation` segments grains from the current frame using PTM-backed local structure information.
## One-Command Install
```bash
curl -sSL https://raw.githubusercontent.com/VoltLabs-Research/CoreToolkit/main/scripts/install-plugin.sh | bash -s -- GrainSegmentation
```
## Build from source
Requires [Conan 2.x](https://docs.conan.io/2/installation.html), CMake 3.20+, and a C++23 compiler (GCC 14+ or Clang 17+).
### Prerequisites
The following Conan packages must be available in your local cache:
- `coretoolkit/1.0.0` (from the `CoreToolkit` repository)
- `structure-identification/1.0.0` (from the `StructureIdentification` repository)
- `polyhedral-template-matching/1.0.0` (from the `PolyhedralTemplateMatching` repository)
For each dependency, clone its repository and create the package:
```bash
conan create --build=missing -o "hwloc/*:shared=True"
```
### Build
From the root of this repository:
```bash
conan install . -of build --build=missing -o "hwloc/*:shared=True"
cmake --preset conan-release
cmake --build build/build/Release -j
```
### Run
```bash
./build/build/Release/grain-segmentation --help
```
### Package as Conan recipe
To make this plugin available as a Conan package for other projects:
```bash
conan create . --build=missing -o "hwloc/*:shared=True"
```
## CLI
Usage:
```bash
grain-segmentation [output_base] [options]
```
### Arguments
| Argument | Required | Description | Default |
| --- | --- | --- | --- |
| `` | Yes | Input LAMMPS dump file. | |
| `[output_base]` | No | Base path for output files. | derived from input |
| `--rmsd ` | No | RMSD threshold for PTM. | `0.1` |
| `--minGrainAtomCount ` | No | Minimum atoms per grain. | `100` |
| `--adoptOrphanAtoms ` | No | Adopt orphan atoms into neighboring grains. | `true` |
| `--handleCoherentInterfaces ` | No | Handle coherent interfaces specially. | `true` |
| `--outputBonds` | No | Export neighbor bonds. | `false` |
| `--threads ` | No | Maximum worker threads. | auto |
| `--help` | No | Print CLI help. | |