pymatgen
                                
                                
                                
                                    pymatgen copied to clipboard
                            
                            
                            
                        Add F* diagram generator to pymatgen
I have written code that takes a list of symmetrized structure objects and generates an f* diagram automatically with the plotly library.
Checklist
- [x] Google format doc strings added. Check with 
ruff. - [x] Type annotations included. Check with 
mypy. - [x] Tests added for new features/fixes.
 - [ ] If applicable, new classes/functions/modules have 
duecredit@due.dcitedecorators to reference relevant papers by DOI (example) 
Tip: Install pre-commit hooks to auto-check types and linting before every commit:
pip install -U pre-commit
pre-commit install
                                    
                                    
                                    
                                
@janosh Everything on this pull request looks good from my end. Let me know if there are any changes you want me to make.
@janosh I got the tests to work with just one cif that is already in the test files directory. Please let me know if there are other changes you would like.
@jonathanjdenney There are still 33 changed files and 23k changed lines which make this PR very hard to review. The purpose of these 3 files is obvious.
Could you either explain the purpose of or remove the other 30 files?
@janosh Sorry, I didn't realize it thinks I changed/added all those files. The ones you highlighted are the only ones I deliberately added. I'm guessing the others are the remnants of some merge error or something. I will get rid of them.
@janosh Sorry, I didn't realize it thinks I changed/added all those files. The ones you highlighted are the only ones I deliberately added. I'm guessing the others are the remnants of some merge error or something. I will get rid of them.
I'm looking through the extra files and in all of them they are treated as changed files but the addition and deletion lines are identical. I don't what happened, but the files are supposed to be there as they are in the main pymatgen code as well. I'm not quite sure how to move forward. Should I just delete those files from my local version and make that as a pull request? I feel like that would have the same problem of showing as 30 edited files.
I think you need to run sth like
git checkout master -- space/separated paths/to/files you/want/to/revert
                                    
                                    
                                    
                                
@jonathanjdenney I removed all the excess files and gzipped pymatgen/analysis/fstar/neutron_factors.csv. The tests look a bit meagre. Maybe you can think of more things to test? E.g. uncovered edge cases?
@jonathanjdenney I removed all the excess files and gzipped
pymatgen/analysis/fstar/neutron_factors.csv. The tests look a bit meagre. Maybe you can think of more things to test? E.g. uncovered edge cases?
I added a few ValueError messages for situations I know won't work. Specifically structures with less than 3 unique sites, and neutron scattering for atomic numbers greater than 96. I'm having trouble thinking of any more edge cases than that. I'm not sure of any specific tests I can add.
Also I would like to set up a tutorial for this, as some of it's features are not all that intuitive. What would be the best way to go about setting that up?