An open API service indexing awesome lists of open source software.

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.

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. | |