@@ -138,7 +138,7 @@ class MolecularVibrations:
138138 visualization of vibrational modes for molecular systems.
139139 """
140140
141- def __init__ (self , atoms , coordinates , hessian , symm_tolerance = 1e-4 , max_symm_fold = 6 ):
141+ def __init__ (self , atoms , coordinates , hessian , symm_tolerance = 1e-4 , max_symm_fold = 6 , skip_judge_symm = False ):
142142 """
143143 Parameters
144144 ----------
@@ -152,6 +152,8 @@ def __init__(self, atoms, coordinates, hessian, symm_tolerance=1e-4, max_symm_fo
152152 Distance tolerance for symmetry operations.
153153 max_symm_fold : int
154154 Maximum n-fold rotation to check.
155+ skip_judge_symm : bool
156+ If True, bypasses the symmetry analysis, optimizing performance by avoiding redundant calculations.
155157 """
156158 self .atoms = atoms
157159 self .coordinates = np .array (coordinates )
@@ -161,8 +163,11 @@ def __init__(self, atoms, coordinates, hessian, symm_tolerance=1e-4, max_symm_fo
161163 self .max_symm_fold = max_symm_fold
162164
163165 # Initialize symmetry analyzer
164- self .symmetry_analyzer = SymmetryAnalyzer (atoms , coordinates , tol = symm_tolerance , max_n_fold = max_symm_fold )
165- self .point_group = self .symmetry_analyzer .analyze ()
166+ if skip_judge_symm :
167+ self .point_group = "C1"
168+ else :
169+ self .symmetry_analyzer = SymmetryAnalyzer (atoms , coordinates , tol = symm_tolerance , max_n_fold = max_symm_fold )
170+ self .point_group = self .symmetry_analyzer .analyze ()
166171
167172 # Atomic masses in atomic mass units
168173 self .mass = np .array ([self ._get_atomic_mass (atom ) for atom in atoms ])
0 commit comments