Closed kitchoi closed 8 years ago
Discussion with Adham led me to realise primitive cell configurations not included in the code. Please hold off review for now. Thanks!
Added features:
tolerance
is added for controlling the numerical error toleratedsame_lattice_type
is renamed to same_primitive_cell_config
as the different primitive cell configurations can be applied for the same lattice typesame_primitive_cell_config
in more symmetric lattice types is replaced by more explicit calculations for enhanced computational performanceguess_primitive_vectors
is made more robustPlease review. Thanks.
A documentation (for sphinx) is not yet written. I believe it is better to write a section for a set of tools under the tools module (lattice, crystal) once they are finalised.
@kitchoi, I left a few minor comments between the lines. Nice looking code generally. This package will be very useful to crystallographers and lattice-Boltzmann enthusiasts. :+1:
Thanks @tuopuu! All fixed. Please let me know if this is good to merge. Thanks.
@kitchoi, looks good. :+1:
I would have liked to still improve the docstrings in same_primitive_cell_config()
, but maybe it's not worth the time. :smile: It's not so easy to define what similarity there means without going too far into mathematics. Anyway, it should be intuitive enough what a comparison between cosines and length ratios here does.
Added lattice_tools as
simphony.tools.lattice_tools
hypothesis
tries to randomly construct many different primitive cells to catch edge cases; most of the time is spent on generating many primitive cell objects, not on callinglattice_tools
Addedhypothesis
to dev_requirements.txtPlease play with it with your use cases.
Related to #240