Skip to content

Improve charge provenance logging #1479

@lilyminium

Description

@lilyminium

Just a few questions on how is charge logging applied, and could it be set to logging.DEBUG instead of INFO? I frequently inspect the logs of Evaluator for information on how protocols are applied, but the charge logging is very noisy to a problematic extent, as it fills up disk space (log files alone take up multiple GB):

2026-04-08 22:15:23.257 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 0
2026-04-08 22:15:23.258 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 27
2026-04-08 22:15:23.258 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 54
2026-04-08 22:15:23.258 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 81
2026-04-08 22:15:23.258 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 108
2026-04-08 22:15:23.258 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 135
2026-04-08 22:15:23.259 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 162
2026-04-08 22:15:23.259 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 189
2026-04-08 22:15:23.259 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 216
2026-04-08 22:15:23.259 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 243
2026-04-08 22:15:23.259 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 270
2026-04-08 22:15:23.259 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 297
2026-04-08 22:15:23.260 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 324
2026-04-08 22:15:23.260 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 351
2026-04-08 22:15:23.260 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 378
2026-04-08 22:15:23.260 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 405
2026-04-08 22:15:23.261 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 432
2026-04-08 22:15:23.261 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 459
2026-04-08 22:15:23.261 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 486
2026-04-08 22:15:23.261 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 513
2026-04-08 22:15:23.261 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 540
2026-04-08 22:15:23.262 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 567
2026-04-08 22:15:23.262 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 594
2026-04-08 22:15:23.262 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 621
2026-04-08 22:15:23.262 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 648
2026-04-08 22:15:23.262 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 675
2026-04-08 22:15:23.262 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 702
2026-04-08 22:15:23.263 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 729
2026-04-08 22:15:23.263 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 756
2026-04-08 22:15:23.263 INFO     Charge section NAGLCharges, using NAGL model openff-gnn-am1bcc-1.0.0.pt, applied to topology atom index 783

I also wonder how the logging is actually applied, since these topology atom indices are not consecutive -- is it per molecule? In that case should the message be a bit more specific about this? Lastly, is it reasonable to expect that all identical molecules get the same charges? In that case could we just log once per unique molecule, instead of for all copies in a Topology?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions