RashmiKumari / g_mmpbsa

MM-PBSA method for GROMACS. For full description, please visit homepage:
http://rashmikumari.github.io/g_mmpbsa/
GNU General Public License v3.0
64 stars 59 forks source link

Why is the at_count variable for atom count being compared as #38

Open BJWiley233 opened 1 year ago

BJWiley233 commented 1 year ago

I am getting this error below using (sounds like I need to be a mind reader to understand this one 😵‍💫 ):

Fatal error:
Number of atoms in selected index (31) does not match with number of atoms (1) in APBS output.

Very confused by this code in https://github.com/RashmiKumari/g_mmpbsa/blob/master/src/GMX50/extrn_apbs.c Won't the at_count always be1? How is this code supposed to work???? I used this input for testing https://github.com/RashmiKumari/g_mmpbsa/blob/master/test/polar_orig/mmpbsa.mdp. Beyond frustrated now...

/* Memory allocation for atom energy */
    if (AtomEnergy != NULL) {
        snew(atEnergy1, 1);
        snew(atEnergy2, 1);
        at_count = 1;
    }

...
if ((AtomEnergy != NULL) && (at_count-1 != isize) ) {
                    gmx_fatal(FARGS,"Number of atoms in selected index (%d) does not match with number of atoms (%d) in APBS output. \n", isize, at_count);
                }