Refactored calculate_born_effective_charge