Voronoi-based Lattice Distances encodes Crystal Lattices to Voronoi Domains and runs Voronoi-based metrics to quantify their Similarity. More details on the used metrics can be found in our paper published in the Crystal Research & Technology Journal: Voronoi-Based Similarity Distances between Arbitrary Crystal Lattices.
The project has been compiled and run only on Windows x64.
-
Install Visual Studio (e.g. Community) choosing the following
single components:.NET SDK.NET 9.0 RuntimeMSVC v143 - C++ Build toolsC++/CLI for Build ToolsWindows SDKCMake C++ Tools for WindowsGit for Windows
-
Download the repository
-
Add the following environmental variables as User:
VS_DIR: Path to Visual Studio with all folders (e.g.Microsoft Visual Studio\2022\Community)
-
Run the following in a
Command Prompt(no PowerShell) to install it:"%VS_DIR%\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 cd VoronoiLatticeDistances/windows-setup dotnet build dotnet run install Release -
Restart the command prompt and run the executables:
voronoilatticedistances.exeorvoronoilatticedistances_off.exe.
To compute correctly the metrics, it is required that all input CIF files contain the primitive unit cell.
Run the executable without parameters for the usage. There are following some examples.
.\voronoilatticedistances.exe -inputdir "path\to\cif_folder" -outputdir "path\to\output_dir" -ds -dh -threads 5
.\voronoilatticedistances.exe -inputdir "path\to\cif_folder" -outputdir "path\to\output_dir" -off -vol
File .vtp can be visualized with Paraview software.
.\voronoilatticedistances.exe -inputdir "path\to\cif_folder" -outputdir "path\to\output_dir" -vtp
.\voronoilatticedistances_off.exe -inputdir "path\to\off_folder" -outputdir "path\to\output_dir" -ds -dh
Required options for voronoilatticedistances.exe:
-inputdir[Input Folder with CIF files]-outputdir[Output Folder to write metric results]
Output options (at least 1 required):
-volOutputs .csv file with Voronoi Cell volume-vtpOutputs .vtp files with Voronoi Cell of a Lattice (Paraview format file)-csvOutputs .csv files with Lattice and Voronoi Cell points-offOutputs .off files with Voronoi Cell vertices and faces-dsOutputs .csv file with Scale Invariant Distance matrix (n x n) between all n crystal lattices-dhOutputs .csv file with Extended Hausdorff Distance matrix (n x n) between all n crystal lattices
Optional commands:
-intervals[integer n (default n=2)] It affects the number of rotation samples to be considered for metric computations (total number of rotations: 4pi^2n^3)-threads[integer t (default t=1)] Rotation samples are divided among t threads-debugEnable debug message logging-verboseEnable more verbose message logging
There are following the Voronoi domains of 5 experimental (or synthesized) crystal lattices from the T2 dataset used in our experiments: T2-alpha, T2-beta, T2-gamma, T2-epsilon and T2-delta. Plus, the Voronoi Domains of the standard cubic, body-centred cubic and face-centred cubic lattices. Paraview software was used to visualise the output of VoronoiLatticeDistances executables:
|
|
|
| Voronoi Domain computed within the standard cubic, body-centered cubic and face-centered cubic lattice points of the 3x3x3 extended Niggli's Unit Cell. | ||
The dendrogram and the heatmap of the Voronoi-based metrics can be generated with the following script. The input csv file is generated by the options -dh or -ds of the previous executables.
RScript.exe .\Scripts\make_dendrogram_heatmap.R [csv file]
You can install dependencies, project and run tests as follows
cd VoronoiLatticeDistances/windows-setup
dotnet run tests
...or
dotnet run installdeps Debug
dotnet run install Debug
cd ../build
ctest --build-config Debug --build-target install --extra-verbose













