I ran an MC with an attached CE I wrote out a structure every MC step is it possible to use the BinaryShortRangeOrderObserver with this data?
I read my ClusterExpansion-file and XDATCAR-file I used in the KMC I then initalized the BinaryShortRangeOrderObserver with the ClusterSpace read from the CE the first Structure of the XDATCAR the pair-radius (the biggest radius) of my ClusterExpansion but I get an
RuntimeError: Failed to find site by position (findLatticeSiteByPosition).
Full Error Message:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[4], line 18, in analyze(xdatcar_path)
15 sro_parameters = []
17 # Setting up Observer
---> 18 sro = BinaryShortRangeOrderObserver(
19 cluster_space=cs,
20 structure=structures[0],
21 radius=8.09 )
23 # Process each structure-snapshot
24 for i, structure in enumerate(structures):
File ~/anaconda3/lib/python3.10/site-packages/mchammer/observers/binary_short_range_order_observer.py:93, in BinaryShortRangeOrderObserver.__init__(self, cluster_space, structure, radius, interval)
88 super().__init__(interval=interval, return_type=dict,
89 tag='BinaryShortRangeOrderObserver')
91 self._structure = structure
---> 93 self._cluster_space = ClusterSpace(
94 structure=cluster_space.primitive_structure,
95 cutoffs=[radius],
96 chemical_symbols=cluster_space.chemical_symbols)
97 self._cluster_count_observer = ClusterCountObserver(
98 cluster_space=self._cluster_space, structure=structure,
99 interval=interval)
101 self._sublattices = self._cluster_space.get_sublattices(structure)
File ~/anaconda3/lib/python3.10/site-packages/icet/core/cluster_space.py:147, in ClusterSpace.__init__(self, structure, cutoffs, chemical_symbols, symprec, position_tolerance)
144 self._config['fractional_position_tolerance'] = round(tol, -int(floor(log10(abs(tol)))))
146 # set up orbit list
--> 147 self._orbit_list = OrbitList(
148 structure=occupied_primitive,
149 cutoffs=self._cutoffs,
150 chemical_symbols=self._primitive_chemical_symbols,
151 symprec=self.symprec,
152 position_tolerance=self.position_tolerance,
153 fractional_position_tolerance=self.fractional_position_tolerance)
154 self._orbit_list.remove_orbits_with_inactive_sites()
156 # call (base) C++ constructor
File ~/anaconda3/lib/python3.10/site-packages/icet/core/orbit_list.py:83, in OrbitList.__init__(self, structure, cutoffs, chemical_symbols, symprec, position_tolerance, fractional_position_tolerance)
80 logger.info('Done getting neighbor lists.')
82 # Transform matrix_of_equivalent_positions to be in lattice site format
---> 83 pm_lattice_sites = _get_lattice_site_matrix_of_equivalent_positions(
84 structure=prim_structure,
85 matrix_of_equivalent_positions=matrix_of_equivalent_positions,
86 fractional_position_tolerance=fractional_position_tolerance,
87 prune=True)
89 logger.info('Transformation of matrix of equivalent positions'
90 ' to lattice neighbor format completed.')
92 _OrbitList.__init__(self,
93 structure=prim_structure,
94 matrix_of_equivalent_sites=pm_lattice_sites,
95 neighbor_lists=neighbor_lists,
96 position_tolerance=position_tolerance)
File ~/anaconda3/lib/python3.10/site-packages/icet/core/matrix_of_equivalent_positions.py:163, in _get_lattice_site_matrix_of_equivalent_positions(structure, matrix_of_equivalent_positions, fractional_position_tolerance, prune)
161 lattice_sites = []
162 if np.all(structure.pbc):
--> 163 lattice_sites = structure.find_lattice_sites_by_positions(
164 positions=positions, fractional_position_tolerance=fractional_position_tolerance)
165 else:
166 raise ValueError('Input structure must have periodic boundary conditions.')
File ~/anaconda3/lib/python3.10/site-packages/icet/core/structure.py:76, in Structure.find_lattice_sites_by_positions(self, positions, fractional_position_tolerance)
74 lattice_sites = []
75 for position in positions:
---> 76 lattice_sites.append(self.find_lattice_site_by_position(
77 position=position,
78 fractional_position_tolerance=fractional_position_tolerance))
79 return lattice_sites
RuntimeError: Failed to find site by position (findLatticeSiteByPosition).
Try increasing symprec or position_tolerance.
position: 2.8429 6.56539 2.35761
scaled position: 2.5 0.5 -2.5
fractional position tolerance: 2e-06