Dear Axel and Steve,
I am still working on modifying fix_gcmc to perform gcmc with LAMMPS and calculate the energy using VASP. I realized I have to modify the attempt_atomic_deletion_full() function to communicate the correct atomic coordinates to VASP. I’ve done that by basically-
· Choose random atom
· Delete the atom, calculate the energy
· If new configuration is not accepted, then create an atom of the same type at the same coordinates to restore original configuration
However I occasionally run into a type error. Sometimes when a deletion is attempted, the atom type that is communicated to VASP is a random large negative number, not the correct type. So VASP cannot create the POSCAR, and the simulation fails. My test system is a hydrogen atom in a 10x10x10 Ang^3 box. Only hydrogen atoms are exchanged.
I think this error happens when the first atom is attempted to be deleted, because when GCMC tries to delete the 2nd atom, the program successfully rejects the attempt and continues by restoring the original configuration. But I am not sure why… am I supposed to be communicating something to all the processors (with MPI_Allreduce maybe)?
I have attached the modified attempt_atomic_deletion_full() code here.
Thank you in advance for your help!
attempt_atomic_deletion_full.cpp (1.71 KB)