Normally, if the uncorrected bond order is greater than a certain threshold, it is added to the initial bond list and subsequently bond order corrections are applied based on the neighborhood of the atoms forming the bond. In the context of parameter optimization though, whether the pair i-j will form a bond above the given threshold also depends on the values of those parameters. Furthermore, if a given molecular structure in the training dataset requires geometry optimization (as is needed for most structural properties), atom positions change as well. JAX requires an expensive recompilation if the interaction list sizes change. Therefore we create the interaction lists once before the optimization starts and use masks to ignore the unwanted elements throughout the parameter and/or geometry optimization steps. For this purpose, for every unique element pair, the maximum possible distance where a given pair can have a valid bond order is found. If some BO related parameters are included in the optimization, values which maximize the BO term are selected from the specified parameter ranges. Then through a distance scan, the maximum possible distance is determined as the cutoff for inclusion of bond orders between that pair of elements. For geometries that require minimization, the maximum calculated distance is extended by a buffer distance to be able to accommodate potential atom position changes.