def generateBuildingBlock(self, numPoints, xRange1, xRange2, yRange1, yRange2, zRange1, zRange2, minDist, envelopeList=['None'], pointsToAvoid=[], visualiseEnvelope=(0, 200), showBlockDirector=False): self.xRange1 = xRange1 self.xRange2 = xRange2 self.yRange1 = yRange1 self.yRange2 = yRange2 self.zRange1 = zRange1 self.zRange2 = zRange2 return NBB.generateBuildingBlock(self, numPoints, minDist, envelopeList=envelopeList, pointsToAvoid=pointsToAvoid, visualiseEnvelope=visualiseEnvelope, showBlockDirector=False)
def generateBuildingBlock(self, numPoints, xRadius, yRadius, zRadius, theta1, theta2, phi1, phi2, minDist, envelopeList=['None'], pointsToAvoid=[], visualiseEnvelope=(0, 200, 'envelope.xyz'), showBlockDirector=False, defaultBlockRefPoint=None): self.xRadius = xRadius self.yRadius = yRadius self.zRadius = zRadius self.theta1 = theta1 * np.pi / 180.0 self.theta2 = theta2 * np.pi / 180.0 self.phi1 = phi1 * np.pi / 180.0 self.phi2 = phi2 * np.pi / 180.0 return NBB.generateBuildingBlock( self, numPoints, minDist, envelopeList=envelopeList, pointsToAvoid=pointsToAvoid, visualiseEnvelope=visualiseEnvelope, showBlockDirector=showBlockDirector, defaultBlockRefPoint=defaultBlockRefPoint)
def generateBuildingBlock(self, numPoints, minDist, graph, points, params, packType, epsilon, envelopeList=['None'], pointsToAvoid=[], visualiseEnvelope=(0, 200, 'envelope.xyz'), showBlockDirector=False): self.graph = graph self.points = points self.params = params self.packType = packType # inside, outside or surface self.epsilon = epsilon # tolerance on equality between two real values. self.xMin, self.xMax, self.yMin, self.yMax, self.zMin, self.zMax = self.boundingRegion( ) BuildingBlock = NBB.generateBuildingBlock( self, numPoints, minDist, envelopeList=envelopeList, pointsToAvoid=pointsToAvoid, visualiseEnvelope=visualiseEnvelope, showBlockDirector=showBlockDirector) directorStatus = self.computeDirectors() # extract and normalise the directors directors = [ dirn[1] / np.linalg.norm(dirn[1]) for dirn in directorStatus ] return BuildingBlock, directors
def generateBuildingBlock(self, numPoints, radius, theta1, theta2, phi1, phi2, minDist, envelopeList=['None'], pointsToAvoid=[], showBlockDirector=False, visualiseEnvelope=(0, 200)): self.radius = radius self.theta1 = theta1 * np.pi / 180 self.theta2 = theta2 * np.pi / 180 if self.theta2 < self.theta1: self.theta2 = self.theta1 self.theta1 = theta2 * np.pi / 180.0 self.phi1 = phi1 * np.pi / 180 self.phi2 = phi2 * np.pi / 180 if self.phi2 < self.phi1: self.phi2 = self.phi1 self.phi1 = phi2 * np.pi / 180.0 return NBB.generateBuildingBlock(self, numPoints, minDist, envelopeList=envelopeList, pointsToAvoid=pointsToAvoid, showBlockDirector=showBlockDirector, visualiseEnvelope=(0, 200))
def generateBuildingBlock(self, numPoints, xSize, ySize, zSize, thetaDir1, thetaDir2, phiDir1, phiDir2, minDist, pLength, numSpheresPerParticle, envelopeList=['None'], pointsToAvoid=[], visualiseEnvelope=(0, 200, 'envelope.xyz'), showBlockDirector=False): self.xSize = xSize self.ySize = ySize self.zSize = zSize self.thetaDir1 = thetaDir1 * np.pi / 180.0 self.thetaDir2 = thetaDir2 * np.pi / 180.0 self.phiDir1 = phiDir1 * np.pi / 180.0 self.phiDir2 = phiDir2 * np.pi / 180.0 self.minDist = minDist self.pLength = pLength self.numSpheresPerParticle = numSpheresPerParticle return NBB.generateBuildingBlock(self, numPoints, minDist, envelopeList=envelopeList, pointsToAvoid=pointsToAvoid, visualiseEnvelope=visualiseEnvelope, showBlockDirector=showBlockDirector)
def generateBuildingBlock(self, numPoints, xRange1, xRange2, yRange1, yRange2, zRange1, zRange2, minDist, r0, proximityT, seedLength, envelopeList=['None'], pointsToAvoid=[], visualiseEnvelope=(0,200), showBlockDirector=False): self.xRange1 = xRange1 self.xRange2 = xRange2 self.yRange1 = yRange1 self.yRange2 = yRange2 self.zRange1 = zRange1 self.zRange2 = zRange2 self.r0 = r0 self.proximityScore = 0 self.lenListForProximityScore = 0 self.ProximityT = proximityT self.seedLength = seedLength return NBB.generateBuildingBlock(self, numPoints, minDist, envelopeList=envelopeList, pointsToAvoid=pointsToAvoid, visualiseEnvelope=visualiseEnvelope, showBlockDirector=False)
def generateBuildingBlock(self, numPoints, xRadius, yRadius, zRadius, theta1, theta2, phi1, phi2, thetaDir1, thetaDir2, phiDir1, phiDir2, minDist, pLength, numSpheresPerParticle, envelopeList=['None'], pointsToAvoid=[], visualiseEnvelope=(0, 200, 'envelope.xyz'), showBlockDirector=False): self.xRadius = xRadius self.yRadius = yRadius self.zRadius = zRadius self.theta1 = theta1 * np.pi / 180.0 self.theta2 = theta2 * np.pi / 180.0 self.phi1 = phi1 * np.pi / 180.0 self.phi2 = phi2 * np.pi / 180.0 self.thetaDir1 = thetaDir1 * np.pi / 180.0 self.thetaDir2 = thetaDir2 * np.pi / 180.0 self.phiDir1 = phiDir1 * np.pi / 180.0 self.phiDir2 = phiDir2 * np.pi / 180.0 self.minDist = minDist self.pLength = pLength self.numSpheresPerParticle = numSpheresPerParticle return NBB.generateBuildingBlock(self, numPoints, minDist, envelopeList=envelopeList, pointsToAvoid=pointsToAvoid, visualiseEnvelope=visualiseEnvelope, showBlockDirector=showBlockDirector)
def generateBuildingBlock(self, numPoints, rx, ry, z1, z2, phi1, phi2, minDist, envelopeList=['None'], pointsToAvoid=[], visualiseEnvelope=(0, 200), showBlockDirector=False): self.radiusX = rx self.radiusY = ry # process the zs self.z1 = min(z1, z2) self.z2 = max(z1, z2) # compute the length of the cylinder self.zLength = abs(self.z2 - self.z1) self.phi1 = phi1 * np.pi / 180 self.phi2 = phi2 * np.pi / 180 if self.phi2 < self.phi1: self.phi2 = self.phi1 self.phi1 = phi2 * np.pi / 180.0 return NBB.generateBuildingBlock(self, numPoints, minDist, envelopeList=envelopeList, pointsToAvoid=pointsToAvoid, visualiseEnvelope=visualiseEnvelope, showBlockDirector=showBlockDirector)
def generateBuildingBlock( self, numPoints, pointA, pointB, alpha1, alpha2, beta1, beta2, minDist, bondLength, innerSphereR, outerSphereR, spherePos): self.originalNumPoints = numPoints self.pointA = pointA self.pointB = pointB self.bondLength = bondLength # use these ranges for the dihedral and bond angles to find an intial chain between # the end points. We will apply the bonds and dihedrals constraints once we have a starting chain. self.alpha1 = alpha1 * np.pi/180 self.alpha2 = alpha2 * np.pi/180 self.beta1 = beta1 * np.pi/180 self.beta2 = beta2 * np.pi/180 if self.alpha2 < self.alpha1: self.alpha2 = self.alpha1 self.alpha1 = alpha2 * np.pi/180.0 if self.beta2 < self.beta1: self.beta2 = self.beta1 self.beta1 = beta2 * np.pi/180.0 self.bannedSphereCentre = spherePos self.bannedSphereRadiusInner = innerSphereR self.bannedSphereRadiusOuter = outerSphereR return NBB.generateBuildingBlock(self, numPoints, minDist)