ATP CG-AA backmapping

Hi, I am trying to back map ATP from CG-AA.
But, the output (without minimization) I am getting is not correct, I am not able to figure out the issue. I am attaching all the necessary files in the google drive link attached here. The output structure is somewhat like this:


Any help would be highly appreciated, Thanks!
https://drive.google.com/drive/folders/15uMKbUxuMZLCDueddCdW_XjP2IZcl3G8?usp=sharing