Improve alignment when we print free energies
@@ -1408,20 +1408,20 @@ def analyze_directory(source_directory):
calculation_type = ' of solvation'
# Print energies
- logger.info("")
- logger.info("Free energy{}: {:16.3f} +- {:.3f} kT ({:16.3f} +- {:.3f} kcal/mol)".format(
+ logger.info('')
+ logger.info('Free energy{:<13}: {:9.3f} +- {:.3f} kT ({:.3f} +- {:.3f} kcal/mol)'.format(
calculation_type, DeltaF, dDeltaF, DeltaF * kT / units.kilocalories_per_mole,
dDeltaF * kT / units.kilocalories_per_mole))
- logger.info("")
+ logger.info('')
for phase in phase_names:
- logger.info("DeltaG {:<25} : {:16.3f} +- {:.3f} kT".format(phase, data[phase]['DeltaF'],
+ logger.info('DeltaG {:<17}: {:9.3f} +- {:.3f} kT'.format(phase, data[phase]['DeltaF'],
data[phase]['dDeltaF']))
if data[phase]['DeltaF_standard_state_correction'] != 0.0:
- logger.info("DeltaG {:<25} : {:25.3f} kT".format('restraint',
+ logger.info('DeltaG {:<17}: {:18.3f} kT'.format('restraint',
data[phase]['DeltaF_standard_state_correction']))
- logger.info("")
- logger.info("Enthalpy{}: {:16.3f} +- {:.3f} kT ({:16.3f} +- {:.3f} kcal/mol)".format(
+ logger.info('')
+ logger.info('Enthalpy{:<16}: {:9.3f} +- {:.3f} kT ({:.3f} +- {:.3f} kcal/mol)'.format(
calculation_type, DeltaH, dDeltaH, DeltaH * kT / units.kilocalories_per_mole,
dDeltaH * kT / units.kilocalories_per_mole))
