Computes the Continuous Shape Measures(CShM) between a structure and one or more idealized reference shapes. Cosmochlore includes 92 built-in reference polyhedra, and user-defined ones can be supplied via YAML.

cosmochlore cshm <NAME> [OPTIONS]

Options

FlagValueDescription
-n, --ncTreat the problem shape as non-centered, that is, the structure does not include an explicit central atom (only ligand/vertex coordinates are given).
-c, --center<POSITION>1-based position of the atom in the .xyz table that is the centre of the structure. Defaults to the first atom (position 1) when omitted. Cannot be combined with --nc.
-s, --sh<SHAPES>...Restrict the comparison to specific built-in reference shapes by index, for the detected vertex count. If omitted, all applicable built-in shapes are used. Separate the indices with whitespace.
-r, --ref<USER_SHAPES>...Paths to the YAML files that contain user-defined shapes to include in the CShM calculation. Separate the files with whitespace.
-t, --tableWrite a name_cshm_table.csv file containing the output of the calculation.
-i, --idealWrite a name_ideal.xyz file containing the reconstructed idealised structures for all the selected reference shapes.

Oh…, I lost my crab here. 🦀 Thanks for finding it!

Optimal transformation finding

For any given shapes, it can be shown that the optimal translation and scaling are obtained by centring both shapes on their geometric centres and normalizing their size. The optimal rotation is then the one that minimizes , which is solved via singular-value decomposition of the covariance matrix .

Vertex pairing

Naively finding the best point-pair matches between and , grows with . The combinatorial problem is tackled by:

  • Fixed centre: for centred structures, the central atom is paired with the reference shape’s centre, reducing the dimensionality of the problem to
  • Branch and bound: after each partial assignment of point pairs, a best-scenario value is calculated. Permutations that cannot beat the best found so far are discarded early.

Computational cost

Even by taking these measures, the calculation becomes impractical at and completely unaccessible for . There is a plan to include heuristic matching for large shapes in cshm in the future.

Examples