Skip to content

Commit

Permalink
Remove useless pieces of code in update of space groups.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhernandezgarcia committed Oct 20, 2023
1 parent 0a10e03 commit c195a60
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions gflownet/envs/crystals/spacegroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,38 +726,6 @@ def _restrict_space_groups(self, sg_subset: Optional[Iterable] = None):
for ps in ps_to_remove:
del self.point_symmetries[ps]

# Update self.crystal_lattice_systems based on point symmetries
cls_to_remove = []
point_symmetries = set(self.point_symmetries)
for cls in self.crystal_lattice_systems:
cls_point_symmetries = point_symmetries.intersection(
set(self.crystal_lattice_systems[cls]["point_symmetries"])
)
if len(cls_point_symmetries) == 0:
cls_to_remove.append(cls)
else:
self.crystal_lattice_systems[cls]["point_symmetries"] = list(
cls_point_symmetries
)
for cls in cls_to_remove:
del self.crystal_lattice_systems[cls]

# Update self.point_symmetries based on point symmetries
ps_to_remove = []
crystal_lattice_systems = set(self.crystal_lattice_systems)
for ps in self.point_symmetries:
ps_crystal_lattice_systems = crystal_lattice_systems.intersection(
set(self.point_symmetries[ps]["crystal_lattice_systems"])
)
if len(ps_crystal_lattice_systems) == 0:
ps_to_remove.append(ps)
else:
self.point_symmetries[ps]["crystal_lattice_systems"] = list(
ps_crystal_lattice_systems
)
for ps in ps_to_remove:
del self.point_symmetries[ps]

def get_all_terminating_states(
self, apply_stoichiometry_constraints: Optional[bool] = True
) -> List[List]:
Expand Down

0 comments on commit c195a60

Please sign in to comment.