Optimized the memory usage in generating the constraints when PERIODIC_IMAGE_CONV=1.
I have changed the implementation of Constraint::get_constraint_translation_for_periodic_images to allocate memory only for the necessary periodic images, while the memory was allocated for all possible periodic images in the original implementation.
This change in the implementation lead to a speedup of the code, and the execution time of PERIODIC_IMAGE_CONV=1 is now comparable to that of PERIODIC_IMAGE_CONV=0.
Optimized the memory usage in generating the constraints when
PERIODIC_IMAGE_CONV=1
.I have changed the implementation of
Constraint::get_constraint_translation_for_periodic_images
to allocate memory only for the necessary periodic images, while the memory was allocated for all possible periodic images in the original implementation. This change in the implementation lead to a speedup of the code, and the execution time ofPERIODIC_IMAGE_CONV=1
is now comparable to that ofPERIODIC_IMAGE_CONV=0
.