Skip to content
Snippets Groups Projects
Commit 818ab3a9 authored by Kai Sellschopp's avatar Kai Sellschopp
Browse files

since in this new version nothing seems to be reused as is, collect new things in a new folder

parent 1389ebc1
No related branches found
No related tags found
No related merge requests found
......@@ -25,12 +25,12 @@ class AdAtom:
self.add_boundary_condition(dc)
def add_angle_condition(self, neighbourA, neighbourB, angle_min=0.0, angle_max=180.0, center=1):
if center==0:
def add_angle_condition(self, neighbourA, neighbourB, angle_min=0.0, angle_max=180.0, center=self):
if center==0 or center==self:
ac = AngleCondition(neighbourA, self, neighbourB, angle_min, angle_max)
elif center==1:
elif center==1 or center==neighbourA:
ac = AngleCondition(self, neighbourA, neighbourB, angle_min, angle_max)
elif center==2:
elif center==2 or center==neighbourB:
ac = AngleCondition(neighbourA, neighbourB, self, angle_min, angle_max)
else:
print("ERROR! Invalid argument for center!")
......
......@@ -79,6 +79,7 @@ class AngleCondition(BoundaryCondition):
numB = positionsB.shape[1]
numC = positionsC.shape[1]
#TODO: handle MemoryError
posA = positionsA[:,:,np.newaxis,np.newaxis,:].repeat(numB,axis=2).repeat(numC,axis=3)
posB = positionsB[:,np.newaxis,:,np.newaxis,:].repeat(numA,axis=1).repeat(numC,axis=3)
posC = positionsC[:,np.newaxis,np.newaxis,:,:].repeat(numA,axis=1).repeat(numB,axis=2)
......
......@@ -158,3 +158,13 @@ class CodeRed:
print("Done! Generated {:d} structures in total.".format(len(self.combinations)))
return self.combinations
def red(self, **reduction_params):
#TODO: process reduction_params to set up and execute the right reduction technique
# e.g. symmetry reduction, mesh projection reduction, soap distance reduction, ...
# generate informative output
print("Done! Reduced to {:d} structures in total.".format(len(self.combinations)))
return self.combinations
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment