Hi all.
I have a library of cif files that do not contain any connectivity information. Is it possible to generate a connectivity table using pymatgen?
Thanks!
Hi all.
I have a library of cif files that do not contain any connectivity information. Is it possible to generate a connectivity table using pymatgen?
Thanks!
Hi @StevenCQC, welcome!
Yes, absolutely; however, pymatgen does not currently have a facility to write out the connectivity information into the CIF file.
What pymatgen does offer is a variety of bonding algorithms (inside pymatgen.analysis.local_env
) and a StructureGraph
class (inside pymatgen.analysis.graphs
), so that you can import your crystal from the CIF and then try to estimate which bonds might be present (e.g. using StructureGraph.with_local_env_strategy()
. This task is actually not trivial, and can be ambiguous in some cases, which is why a variety of algorithms are offered – we generally recommend CrystalNN
. Hopefully this helps, more info in the docs.
Best,
Matt