Applying the periodic boundary condition

Dear community,

I have been working on the project, preparing the data for the variational autoencoder (VAE) with the graph neural networks (GNN). The graph machine learning model requires node, edge, and global features, which correspond to atoms, bonds, and the entire materials. The preparation of the edge features was intricated but intriguing while implementing the periodic boundary conditions (PBC). Its purpose is to approximate an infinite system with a limited extent with a unit cell. I started applying it to calculating edge features such as bond length and bond angle, as all materials in the Materials Project API were continuum crystals.

Applying the conditions to the materials data forced me to encounter several problems: 1) The atoms far apart from each other, which would be considered close when the PBC is applied, are ambiguous about their connection. I am struggling with verifying whether those atoms form bond. 2) Is there any way I can implement the PBC directly from the Materials Project API? There were PBC indicators, all of which printed ‘true’ for the three axes in the structure data in the SummaryDoc.

Thank you. If you have any further information or question about my project, please do not hesitate to contact me.

Best regards,
Sunwoo Lee