Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overall API/CLI design #1

Open
bernstei opened this issue Mar 23, 2022 · 0 comments
Open

overall API/CLI design #1

bernstei opened this issue Mar 23, 2022 · 0 comments
Assignees

Comments

@bernstei
Copy link
Contributor

bernstei commented Mar 23, 2022

A top level design of the API and CLI would be useful. Could be here, could be in the main README, since it'll be needed as docs eventually anyway. Current process:

  • phonons_setup(): takes an atoms structure and phonopy control params (supercell, displacement) and returns a list of displaced configs
  • do your own calculation, store the resulting forces in a cached Calculator
  • phonons_process(): takes configs with stored forces, returns force constants
  • analysis
    • phonons_analyze_bands(): takes force constants, calculate bands along requested path
    • phonons_analyze_eigenvectors(): takes force constants, calculates eigenvectors and stores them in Atoms.arrays entries

All phonopy specific content is reconstructed as needed from actual atomic configurations and sometimes extra stuff stored in Atoms.info (e.g. the primitive cell that was used to construct the displaced supercells), so you only have to pass one data structure from one stage to the next.

There's also a routine, phonons(), that does all of these in series, with a passed-in ASE calculator, and does some saving/loading of the expensive steps (currently only force calculation).

TODO

  • make it possible to get forces from an arrays item rather than a cached calculator.
  • add controls for phono3py displacements (different supercell, atom pair cutoff, displacement)

What else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants