refactor: modernize Molecule class with cached properties and vectorized operations
- Replace manual property updates with @cached_property for total_mass, com, and inertia_tensor - Introduce invalidate_computed_properties decorator to auto-invalidate cached properties on atom changes - Vectorize distances_between_atoms, sizes_of_molecule, and minimum_distance calculations using numpy - Unify and clarify center of mass and standard orientation methods (move_center_of_mass_to_origin, rotate_to_standard_orientation) - Remove redundant or outdated code, improve typing and error handling - Update dependent files and tests to use new method names and behaviors
This commit is contained in:
@@ -76,7 +76,7 @@ class Player:
|
||||
"\n Translating and rotating molecule to standard orientation..."
|
||||
)
|
||||
|
||||
mol.standard_orientation()
|
||||
mol.rotate_to_standard_orientation()
|
||||
logger.info("\n Done")
|
||||
logger.info("\nNew values:\n")
|
||||
mol.print_mol_info()
|
||||
|
||||
Reference in New Issue
Block a user