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

Emit warning when the input .toml file overwrites the cell configuration in a .pdb file #115

Open
antoinewdg opened this issue Mar 9, 2017 · 3 comments

Comments

@antoinewdg
Copy link
Contributor

Right now this happens completely silently.
Implement something like there

warn!(
"No unit cell in the system, using an infinite unit cell.\n\
You can get rid of this warning by using `cell = []` in the \
input file if this is what you want."
);
.

@antoinewdg antoinewdg changed the title Emit warning when the input .toml file overwrites the cell configuration in a .pdb file Emit warning when the input .toml file overwrites the cell configuration in a .pdb file Mar 9, 2017
@Luthaf
Copy link
Member

Luthaf commented Mar 9, 2017

This need to work not only for PDB files, but for any file with an unit cell: NetCDF, TNG, ...

In order to do this, we can check if the system has a non-infinite unit cell before setting the cell from the input, and send a warning in this case.

@antoinewdg
Copy link
Contributor Author

Do we have a way to test that input files generate a warning in the tests of the input crate ?

@Luthaf
Copy link
Member

Luthaf commented Mar 10, 2017

No, not yet. it should be easy to add to the test framework by using a custom logger and checking the messages at warning level.

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

No branches or pull requests

2 participants