Rename get -> calculate?

Issue #123 resolved
andrew_peterson repo owner created an issue

Some of our functions like get_energy here aren't "intelligent" functions like in calc.get_potential_energy that decide whether a calculation is required. Rather, they are dumb functions that re-calculate whenever get_... is called. Would it be more clear to call these calculate_energy and such?

Comments (7)

  1. Muammar El Khatib

    I think that from the users' perspective, it would be good to keep the old get_energy() as a dummy method printing that this will be changed and call calculate_energy() in order to avoid breaking old scripts. I suppose tests/*.py have to be updated accordingly.

  2. andrew_peterson reporter

    @akhorshi Thanks for catching all those extras. I think we can leave the ones in tflow as-is for now.

    @muammar These are largely internal calls, that a user might access if they are doing something more advanced. The high-level commands (calc.get_potential_energy and calc.get_forces) are unchanged. Those ones are smarter and only trigger a calculation if one is necessary. It is only the calc.model.get_energy commands, which are called by calc.get_potential_energy and such, that are changing. So we're unlikely to break (m)any scripts.

  3. Log in to comment