In the addAll() method, the "size" of the atom array must be set to "newSize" (the number of atoms or molecules in the system) after the for loop.  Otherwise, the system effectively contains no atoms, or whatever number of atoms "size" was initially set to.  If "size" is initially zero and is not made to equal "newSize", PotentialCalculationEnergySum will think that there are no atoms over which to iterate, and the system will behave like an ideal gas (i.e., there is no interatomic potential energy considered).
In the addAll() method, the "size" of the atom array must be set to "newSize" (the number of atoms or molecules in the system) after the for loop.  Otherwise, the system effectively contains no atoms, or whatever number of atoms "size" was initially set to.  If "size" is initially zero and is not made to equal "newSize", PotentialCalculationEnergySum will think that there are no atoms over which to iterate, and the system will behave like an ideal gas (i.e., there is no interatomic potential energy considered).

etomica/etomica,etomica/etomica,ajschult/etomica,ajschult/etomica,ajschult/etomica,etomica/etomica