rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
point is the center of view, and normal gives the direction
origin is the center of view, and normal gives the direction
def __init__(self, shp, ptlist, point, logic, **xx): """ptlist is a list of 3d points describing a selection. point is the center of view, and normal gives the direction of the line of light. Form a structure for telling whether arbitrary points fall inside the curve from the point of view. """ normal = shp.normal c=su...
normal = shp.normal c=sum(ptlist)/len(ptlist) x = norm(ptlist[0]-c) y = norm(cross(normal, x)) pt2d = map(lambda p: V(dot(p, x), dot(p, y)), ptlist) bboxhi = reduce(maximum,pt2d) bboxlo = reduce(minimum,pt2d) ibbhi = array(map(int,ceil(8*bboxhi)+2)) ibblo = array(map(int,floor(8*bboxlo)-2))
simple_shape_2d.__init__( self, shp, ptlist, origin, logic, opts) ibbhi = array(map(int,ceil(8*self.bboxhi)+2)) ibblo = array(map(int,floor(8*self.bboxlo)-2)) bboxlo = self.bboxlo
def __init__(self, shp, ptlist, point, logic, **xx): """ptlist is a list of 3d points describing a selection. point is the center of view, and normal gives the direction of the line of light. Form a structure for telling whether arbitrary points fall inside the curve from the point of view. """ normal = shp.normal c=su...
self.normal = norm(normal) self.x = x self.y = y self.z = self.normal self.slab = xx.get('slab',None)
def __init__(self, shp, ptlist, point, logic, **xx): """ptlist is a list of 3d points describing a selection. point is the center of view, and normal gives the direction of the line of light. Form a structure for telling whether arbitrary points fall inside the curve from the point of view. """ normal = shp.normal c=su...
self.bboxhi = bboxhi self.bboxlo = bboxlo if self.slab: self.bbox = BBox(V(bboxlo, bboxhi), V(x,y), self.slab) else: self.bbox = BBox() self.points=ptlist self.org = point+0.0 self.logic = logic self.eyeball = xx.get('eye',None)
self.x = self.right self.y = self.up self.z = self.normal def isin(self, pt): """Project pt onto the curve's plane and return 1 if it falls inside the curve. """ if self.slab and not self.slab.isin(pt): return False p = self.project_2d(pt) if p == None: return False in_bbox = p[0]>=self.bboxlo[0] and p[1]>=self.bbox...
def __init__(self, shp, ptlist, point, logic, **xx): """ptlist is a list of 3d points describing a selection. point is the center of view, and normal gives the direction of the line of light. Form a structure for telling whether arbitrary points fall inside the curve from the point of view. """ normal = shp.normal c=su...
pl = zip(self.points[:-1],self.points[1:])
pl = zip(self.ptlist[:-1],self.ptlist[1:])
def draw(self): """Draw two projections of the curve at the limits of the thickness that defines the cookie volume. The commented code is for debugging. """ color = logicColor(self.logic) pl = zip(self.points[:-1],self.points[1:]) for p in pl: drawline(color,p[0],p[1]) # for debugging #self.bbox.draw() #if self.eyeba...
def isin(self, pt): """Project pt onto the curve's plane and return 1 if it falls inside the curve. """ if self.slab and not self.slab.isin(pt): return 0 p2 = V(dot(pt, self.x), dot(pt, self.y)) if self.eyeball: p2 = p2 / (dot(pt - self.eyeball, self.normal) / vlen(self.eyeball)) if logical_or.accumulate(less(p2,self.b...
pass
def draw(self): """Draw two projections of the curve at the limits of the thickness that defines the cookie volume. The commented code is for debugging. """ color = logicColor(self.logic) pl = zip(self.points[:-1],self.points[1:]) for p in pl: drawline(color,p[0],p[1]) # for debugging #self.bbox.draw() #if self.eyeba...
def pickline(self, ptlist, point, logic, **xx):
def pickline(self, ptlist, origin, logic, **xx):
def pickline(self, ptlist, point, logic, **xx): """Add a new curve to the shape. Args define the curve (see curve) and the logic operator for the curve telling whether it adds or removes material. """ self.havelist = 0 c = curve(self, ptlist, point, logic, **xx) self.bbox.merge(c.bbox) self.curves += [c]
c = curve(self, ptlist, point, logic, **xx)
c = curve(self, ptlist, origin, logic, **xx)
def pickline(self, ptlist, point, logic, **xx): """Add a new curve to the shape. Args define the curve (see curve) and the logic operator for the curve telling whether it adds or removes material. """ self.havelist = 0 c = curve(self, ptlist, point, logic, **xx) self.bbox.merge(c.bbox) self.curves += [c]
"""Add a new retangle to the shape.
"""Add a new rectangle to the shape.
def pickrect(self, pt1, pt2, org, logic, eye=None, slab=None): """Add a new retangle to the shape. Args define the rectangle and the logic operator for the curve telling whether it adds or removes material. """ self.havelist = 0 c = rectangle(self, pt1, pt2, org, logic, eye=eye, slab=slab) self.bbox.merge(c.bbox) self....
global color
def draw(self,win): """Draw the shape. win, not used, is for consistency among drawing functions (and may be used if drawing logic gets more sophisticated.
print "exception in shape.draw's displist ignored"
print_compact_traceback( "bug: exception in shape.draw's displist; ignored: ")
def draw(self,win): """Draw the shape. win, not used, is for consistency among drawing functions (and may be used if drawing logic gets more sophisticated.
if a.display == diINVISIBLE: continue if c.isin(a.posn()): a.pick()
if c.isin(a.posn()) and a.visible(): a.pick()
def select(self, assy): """Loop thru all the atoms that are visible and select any that are 'in' the shape, ignoring the thickness parameter. """ if assy.selwhat: self.partselect(assy) return c=self.curves[0] if c.logic == 1: for mol in assy.molecules: if mol.hidden: continue for a in mol.atoms.itervalues(): if a.displ...
if (c.isin(a.posn()) and a.molecule.display != diINVISIBLE and a.display != diINVISIBLE):
if c.isin(a.posn()) and a.visible():
def select(self, assy): """Loop thru all the atoms that are visible and select any that are 'in' the shape, ignoring the thickness parameter. """ if assy.selwhat: self.partselect(assy) return c=self.curves[0] if c.logic == 1: for mol in assy.molecules: if mol.hidden: continue for a in mol.atoms.itervalues(): if a.displ...
if c.isin(a.posn()): a.unpick()
if a.molecule.hidden: continue if c.isin(a.posn()) and a.visible(): a.unpick()
def select(self, assy): """Loop thru all the atoms that are visible and select any that are 'in' the shape, ignoring the thickness parameter. """ if assy.selwhat: self.partselect(assy) return c=self.curves[0] if c.logic == 1: for mol in assy.molecules: if mol.hidden: continue for a in mol.atoms.itervalues(): if a.displ...
if a.display == diINVISIBLE: continue if c.isin(a.posn()):
if c.isin(a.posn()) and a.visible():
def partselect(self, assy): """Loop thru all the atoms that are visible and select any that are 'in' the shape, ignoring the thickness parameter. pick the parts that contain them """ #---This function has been modified by Huaicai on 10/05/04 to fix bugs of shift & Ctrl drag #---selection of molecules #---Some very tric...
for a in m.atoms.values(): if c.isin(a.posn()):
if m.hidden: continue for a in m.atoms.itervalues(): if c.isin(a.posn()) and a.visible():
def partselect(self, assy): """Loop thru all the atoms that are visible and select any that are 'in' the shape, ignoring the thickness parameter. pick the parts that contain them """ #---This function has been modified by Huaicai on 10/05/04 to fix bugs of shift & Ctrl drag #---selection of molecules #---Some very tric...
if sys.platform == 'linux2': MMKitWin.show()
if sys.platform == 'linux2': if self.isVisible(): MMKitWin.show()
def modifyMMKit(self): '''Open The Molecular Modeling Kit for Build (DEPOSIT) mode. ''' # This should probably be moved elsewhere global MMKitWin if MMKitWin and MMKitWin.isShown(): return MMKitWin
MMKitWin.show()
if self.isVisible(): MMKitWin.show()
def modifyMMKit(self): '''Open The Molecular Modeling Kit for Build (DEPOSIT) mode. ''' # This should probably be moved elsewhere global MMKitWin if MMKitWin and MMKitWin.isShown(): return MMKitWin
_e_eval_function = lambda x,y:x*y
_e_eval_function = staticmethod(lambda x,y:x*y)
def __str__(self): return "%s * %s" % self._e_args #e need parens?
_e_eval_function = lambda *args:printfunc(tuple(args), len(args), prefix="tupleeval")
_e_eval_function = staticmethod(lambda *args:printfunc(tuple(args), len(args), prefix="tupleeval"))
def __str__(self): return "%s" % (tuple(self._e_args),) #e need parens?
self.rmsd_combox.setCurrentItem(self.pset.ui.rmdsconv)
self.rmsd_combox.setCurrentItem(self.pset.ui.rmsdconv)
def _setup(self): ''' Setup widgets to initial (default or defined) values. Return True on error. ''' gamess = self.gamessJig # In case we cancel later (not implemented yet) # Init the top widgets (name, psets drop box, comment) self.name_linedit.setText(self.gamessJig.name) self.runtyp_combox.setCurrentItem(self.pse...
self.glpane.scale=(self.assy.bbox.scale() * 0.5) + vlen(self.assy.center)
self.glpane.scale = self.assy.bbox.scale() + vlen(self.assy.center)
def setViewRecenter(self): """Recenter the view around the origin of modeling space. """ self.history.message(greenmsg("Recentert View:")) self.glpane.pov = V(0,0,0) #bCenter = V(self.assy.center[0], self.assy.center[1], self.assy.center[2]) self.assy.computeBoundingBox() self.glpane.scale=(self.assy.bbox.scale() * 0.5...
def getDefaultWorkingDirectory(): '''Returns the default working directory. '''
def getDefaultWorkingDirectory(): """Returns the default Working Directory. """
def getDefaultWorkingDirectory(): # This should be moved to platform.py. Confirm with Bruce. Mark 060729. '''Returns the default working directory. ''' import sys, os wd = '' if sys.platform == 'win32': # Windows # e.g. "C:\Documents and Settings\Mark\My Documents" wd = os.path.expanduser("~/My Documents") if not os.pa...
wd = os.path.expanduser("~/My Documents") if not os.path.isdir(wd): wd = os.path.expanduser("~")
wd = os.path.normpath(os.path.expanduser("~/My Documents")) if not os.path.isdir(wd): wd = os.path.normpath(os.path.expanduser("~"))
def getDefaultWorkingDirectory(): # This should be moved to platform.py. Confirm with Bruce. Mark 060729. '''Returns the default working directory. ''' import sys, os wd = '' if sys.platform == 'win32': # Windows # e.g. "C:\Documents and Settings\Mark\My Documents" wd = os.path.expanduser("~/My Documents") if not os.pa...
wd = os.path.expanduser("~")
wd = os.path.normpath(os.path.expanduser("~"))
def getDefaultWorkingDirectory(): # This should be moved to platform.py. Confirm with Bruce. Mark 060729. '''Returns the default working directory. ''' import sys, os wd = '' if sys.platform == 'win32': # Windows # e.g. "C:\Documents and Settings\Mark\My Documents" wd = os.path.expanduser("~/My Documents") if not os.pa...
return os.path.normpath(os.path.expanduser("~"))
return wd
def getDefaultWorkingDirectory(): # This should be moved to platform.py. Confirm with Bruce. Mark 060729. '''Returns the default working directory. ''' import sys, os wd = '' if sys.platform == 'win32': # Windows # e.g. "C:\Documents and Settings\Mark\My Documents" wd = os.path.expanduser("~/My Documents") if not os.pa...
print "getDefaultWorkingDirectory(): default working directory [", wd ," does not exist. Setting default working directory to [.]"
print "getDefaultWorkingDirectory(): default working directory [", \ wd , "] does not exist. Setting default working directory to [.]"
def getDefaultWorkingDirectory(): # This should be moved to platform.py. Confirm with Bruce. Mark 060729. '''Returns the default working directory. ''' import sys, os wd = '' if sys.platform == 'win32': # Windows # e.g. "C:\Documents and Settings\Mark\My Documents" wd = os.path.expanduser("~/My Documents") if not os.pa...
self.transXAction.setText(self.__tr("X Translation")) self.transXAction.setMenuText(self.__tr("X Translation")) self.transXAction.setToolTip(self.__tr("X Translation")) self.transYAction.setText(self.__tr("Y Translation")) self.transYAction.setMenuText(self.__tr("Y Translation")) self.transYAction.setToolTip(self.__tr(...
self.transXAction.setText(self.__tr("X Transformation")) self.transXAction.setMenuText(self.__tr("X Transformation")) self.transXAction.setToolTip(self.__tr("X Transformation")) self.transYAction.setText(self.__tr("Y Transformation")) self.transYAction.setMenuText(self.__tr("Y Transformation")) self.transYAction.setToo...
def languageChange(self): self.setCaption(self.__tr("nanoENGINEER-1")) self.fileOpenAction.setText(self.__tr("Open")) self.fileOpenAction.setMenuText(self.__tr("&Open...")) self.fileOpenAction.setAccel(self.__tr("Ctrl+O")) self.fileSaveAction.setText(self.__tr("Save")) self.fileSaveAction.setMenuText(self.__tr("&Save")...
(cd $2; find . -type d -exec chmod ugo+rx {} \;) (cd $2; find . -type f -exec chmod ugo+r {} \;)
(cd $2/instPath; find . -type d -exec chmod ugo+rx {} \;) (cd $2/instPath; find . -type f -exec chmod ugo+r {} \;)
def _writePostFlightFile(self, pfFile): """Write the postflight file Mac Package Installer """ instPath = os.path.basename(self.buildSourcePath) # "nanoENGINEER-1-0.0.6" appname = self.appName + '.app' cf = os.path.join(instPath, appname, 'Contents/Frameworks') # $2/instPath --> /Applications/nanoENGINEER-1-0.0.6 # $...
self.cntl.setup(0)
self.cntl.setup()
def edit(self): self.cntl.setup(0) self.cntl.exec_loop()
self.changed()
def modifyPassivate(self): if self.selwhat == SELWHAT_CHUNKS: for m in self.selmols: m.Passivate(True) # arg True makes it work on all atoms in m else: assert self.selwhat == SELWHAT_ATOMS for m in self.molecules: m.Passivate() # lack of arg makes it work on only selected atoms # (maybe it could just iterate over selat...
class TestAbortedInOvertime(Exception): pass
def compare(self, questionableXyz, knownGoodXyzFile, lengthTolerance, angleTolerance): todo("handle multiple-frame xyz files from animations") xyz = XyzFile() if type(questionableXyz) == types.StringType: xyz.read(questionableXyz) elif type(questionableXyz) == types.ListType: xyz.readFromList(questionableXyz) else: rai...
n = 0
def blaberr(): r = str(simProcess.readStderr()) if DEBUG > 1: print "STDERR", r stderr.write(str(simProcess.readStderr()))
n = n + 1 if n > 150: raise TestAbortedInOvertime, self.basename simProcess.kill()
def blaberr(): r = str(simProcess.readStderr()) if DEBUG > 1: print "STDERR", r stderr.write(str(simProcess.readStderr()))
DEFAULT_SIMOPTS = ("--minimize", "--dump-as-text", "FOO.mmp")
DEFAULT_SIMOPTS = ("--minimize", "--dump-as-text", "--trace-file", "FOO.trc", "FOO.mmp")
def runInSandbox(self): global testTimes testTimes[self.methodname] = 0.0
DEFAULT_SIMOPTS = ("--dump-as-text", "FOO.mmp")
DEFAULT_SIMOPTS = ("--dump-as-text", "--trace-file", "FOO.trc", "FOO.mmp")
def runInSandbox(self): global testTimes testTimes[self.methodname] = 0.0
'test_badCallback2',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_minimize_0013',
'test_singlebond_stretch_H_H',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_singlebond_stretch_F_F',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_singlebond_stretch_H_F', 'test_singlebond_stretch_H_H', 'test_singlebond_stretch_Cl_OH', 'test_badCallback3', 'test_singlebond_stretch_H_PH2',
'test_singlebond_stretch_Cl_AlH2', 'test_singlebond_stretch_Cl_PH2',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_singlebond_stretch_F_OH', 'test_singlebond_stretch_F_PH2',
'test_singlebond_stretch_Cl_NH2', 'test_singlebond_stretch_H_SiH3', 'test_singlebond_stretch_F_CH3', 'test_singlebond_stretch_H_PH2',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_singlebond_stretch_H_BH2', 'test_singlebond_stretch_Cl_PH2', 'test_singlebond_stretch_H_SiH3', 'test_singlebond_stretch_Cl_SH',
'test_callWrongSimulatorObject', 'test_singlebond_stretch_F_SiH3', 'test_singlebond_stretch_HS_OH', 'test_singlebond_stretch_F_AlH2', 'test_singlebond_stretch_F_BH2', 'test_singlebond_stretch_HS_SH', 'test_singlebond_stretch_Cl_BH2', 'test_singlebond_stretch_HS_PH2', 'test_singlebond_stretch_HO_AlH2', 'test_singlebond_...
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_singlebond_stretch_Cl_NH2', 'test_singlebond_stretch_Cl_CH3',
'test_singlebond_stretch_HO_PH2', 'test_minimize_0010', 'test_singlebond_stretch_H2P_SiH3', 'test_singlebond_stretch_H2P_AlH2', 'test_singlebond_stretch_HS_CH3', 'test_singlebond_stretch_H2B_PH2',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_singlebond_stretch_F_NH2', 'test_singlebond_stretch_HS_SH', 'test_singlebond_stretch_HS_OH', 'test_singlebond_stretch_HS_PH2', 'test_singlebond_stretch_F_BH2', 'test_singlebond_stretch_F_AlH2', 'test_singlebond_stretch_Cl_AlH2', 'test_singlebond_stretch_H2P_PH2', 'test_singlebond_stretch_F_SiH3', 'test_singlebond...
'test_singlebond_stretch_H3Si_SiH3', 'test_heteroatom_organics_CH3AlH2',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_singlebond_stretch_H3Si_SiH3',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_singlebond_stretch_HO_AlH2',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_singlebond_stretch_H2Al_SiH3',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_singlebond_stretch_H3C_CH3',
'test_singlebond_stretch_H2Al_SiH3',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_frameAndTraceCallback',
'test_singlebond_stretch_H3C_CH3',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_heteroatom_organics_CH3BH2',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_callWrongSimulatorObject',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_heteroatom_organics_CH3OCH3', 'test_heteroatom_organics_C3H6S',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_heteroatom_organics_C3H6NH', 'test_singlebond_stretch_H2N_AlH2',
'test_singlebond_stretch_HO_OH',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_floppy_organics_C4H8', 'test_singlebond_stretch_HO_OH',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_heteroatom_organics_C3H6AlH',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_rigid_organics_C10H12',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_heteroatom_organics_C3H6SiH2', 'test_heteroatom_organics_C5H10S',
'test_rigid_organics_C10H12', 'test_dpbFileShouldBeBinary', 'test_rigid_organics_C6H10', 'test_heteroatom_organics_C5H10O', 'test_singlebond_stretch_HS_NH2', 'test_dpbFileShouldBeBinaryAfterMinimize', 'test_floppy_organics_C6H12a',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_traceCallbackWithMotor', 'test_dpbFileShouldBeBinary', 'test_singlebond_stretch_HS_SiH3', 'test_rigid_organics_C6H10',
'test_singlebond_stretch_HO_BH2',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_heteroatom_organics_ADAM_F_c3v', 'test_floppy_organics_C6H12a', 'test_heteroatom_organics_ADAM_Cl_c3v', 'test_singlebond_stretch_HS_NH2', 'test_heteroatom_organics_N_ADAM_C3v', 'test_dpbFileShouldBeBinaryAfterMinimize', 'test_floppy_organics_C6H12b', 'test_heteroatom_organics_ADAMframe_O_Cs', 'test_heteroatom_org...
'test_heteroatom_organics_P_ADAM_C3v', 'test_heteroatom_organics_B_ADAM_C3v',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_rigid_organics_C10H14', 'test_heteroatom_organics_ADAMframe_NH_Cs', 'test_heteroatom_organics_C5H10NH', 'test_heteroatom_organics_C5H10PH', 'test_heteroatom_organics_P_ADAM_C3v',
'test_singlebond_stretch_HS_AlH2', 'test_floppy_organics_C4H10a',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_heteroatom_organics_CH3NHCH3', 'test_floppy_organics_C4H10a', 'test_heteroatom_organics_C_CH3_3_SiH3', 'test_singlebond_stretch_HS_AlH2',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_heteroatom_organics_CH3SiH3', 'test_heteroatom_organics_C4H8SiH2', 'test_heteroatom_organics_SiH_ADAM_C3v',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_heteroatom_organics_ADAMframe_SiH2_c2v',
'test_heteroatom_organics_C_CH3_3_SiH3', 'test_heteroatom_organics_SiH_ADAM_C3v', 'test_heteroatom_organics_C4H8SiH2', 'test_floppy_organics_C5H12a', 'test_pyrex_minimize0001', 'test_minimize_0005',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_minimize_0005',
'test_heteroatom_organics_C5H10SiH2', 'test_heteroatom_organics_C4H8BH', 'test_heteroatom_organics_CH3SCH3', 'test_heteroatom_organics_Al_ADAM_C3v',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_heteroatom_organics_C5H10SiH2',
'test_rigid_organics_C14H20', 'test_singlebond_stretch_H2B_NH2', 'test_floppy_organics_C5H12b',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_heteroatom_organics_C4H8BH', 'test_rigid_organics_C14H20', 'test_heteroatom_organics_Al_ADAM_C3v', 'test_heteroatom_organics_CH3SCH3', 'test_heteroatom_organics_C4H8AlH', 'test_heteroatom_organics_ADAMframe_PH_Cs', 'test_floppy_organics_C5H12b',
'test_minimize_0001', 'test_heteroatom_organics_C_CH3_3_BH2', 'test_heteroatom_organics_C_CH3_3_AlH2', 'test_heteroatom_organics_C_CH3_3_NH2',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_minimize_0001', 'test_heteroatom_organics_C5H10O', 'test_heteroatom_organics_C_CH3_3_BH2', 'test_singlebond_stretch_H2B_NH2', 'test_heteroatom_organics_C_CH3_3_NH2', 'test_heteroatom_organics_ADAM_BH2', 'test_pyrex_minimize0001',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_floppy_organics_C6H14b', 'test_heteroatom_organics_C_CH3_3_AlH2',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_heteroatom_organics_CH3AlH2',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_minimize_0008', 'test_heteroatom_organics_ADAM_NH2_Cs', 'test_heteroatom_organics_CH3AlHCH3',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_heteroatom_organics_B_ADAM_C3v',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_floppy_organics_C6H14c',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_floppy_organics_C7H14b', 'test_floppy_organics_C5H12c', 'test_heteroatom_organics_ADAM_PH2_Cs', 'test_floppy_organics_C5H12a',
'test_floppy_organics_C6H14e',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_floppy_organics_C6H14e',
'test_amino_acids_his_l_aminoacid',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_dynamicsStepStuff',
'test_rigid_organics_C14H24',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_amino_acids_arg_l_aminoacid',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_rigid_organics_C14H24',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_amino_acids_thr_l_aminoacid', 'test_amino_acids_pro_l_aminoacid', 'test_amino_acids_asn_l_aminoacid', 'test_amino_acids_val_l_aminoacid',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_amino_acids_his_l_aminoacid',
'test_amino_acids_val_l_aminoacid', 'test_amino_acids_leu_l_aminoacid',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_amino_acids_leu_l_aminoacid',
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
'test_amino_acids_tyr_l_aminoacid']
'test_amino_acids_arg_l_aminoacid', 'test_amino_acids_tyr_l_aminoacid' ]
def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE)
assert "test_framecallback" in dir(Tests) print dir(Tests) casenames = filter(lambda n: n.startswith("test_"), dir(Tests)) def gettime(x): try: return testTimes[x] except KeyError: return 0. def sortfunc(x, y): return cmp(gettime(x), gettime(y)) if not TIME_ONLY: pass casenames.sort(sortfunc)
for attr in dir(Tests): if attr.startswith("test_"): casenames.append(attr)
def passAutomatically(self): pass
casenames = filter(lambda x: x in dir(Tests), RANKED_BY_RUNTIME)
for attr in RANKED_BY_RUNTIME: if hasattr(Tests, attr): casenames.append(attr)
def sortfunc(x, y): return cmp(gettime(x), gettime(y))
print len(RANKED_BY_RUNTIME) - testsSkipped, "tests really done,",
print len(casenames) - testsSkipped, "tests really done,",
def sortfunc(x, y): return cmp(gettime(x), gettime(y))
if self.element is Singlet and debug_pref("draw bondpoints as stubs in Atom", Choice_boolean_False): otherpos = self.singlet_neighbor().baseposn() out = norm(pos - otherpos) inpos = pos - 0.015 * out outpos = pos + 0.015 * out drawcylinder(color, inpos, outpos, drawrad + 0.03, 1) elif self.element is not Singlet or n...
self.draw_atom_sphere(color, pos, drawrad, level, dispdef)
def draw(self, glpane, dispdef, col, level): """Draw this atom depending on whether it is picked and its display mode (possibly inherited from dispdef). An atom's display mode overrides the inherited one from the molecule or glpane, but a molecule's color overrides the atom's element-dependent one. No longer treats glp...
drawsphere(color, pos, drawrad, level)
self.draw_atom_sphere(color, pos, drawrad, level, None, abs_coords = True)
def draw_in_abs_coords(self, glpane, color): #bruce 050610 ###@@@ needs to be told whether or not to "draw as selatom"; now it does """Draw this atom in absolute (world) coordinates, using the specified color (ignoring the color it would naturally be drawn with). See code comments about radius and display mode (current...
if povray_exe == 'megapov.exe':
if sys.platform == 'win32': megapov_exe = 'megapov.exe' else: megapov_exe = 'megapov' if povray_exe == megapov_exe:
def write_povray_ini_file(povray_ini_fname, povrayscene_file, width, height, output_type='png'): '''Write <povray_ini> file. The output image is placed next to the <povrayscene_file> file with the extension based on <output_type>. <width>, <height> are the width and height of the rendered image. (int) <output_type> is ...
ainfo = ("Atom %s [%s] [X = %.2f] [Y = %.2f] [Z = %.2f]" % \
ainfo = ("Atom %s [%s] [X = %.3f] [Y = %.3f] [Z = %.3f]" % \
def getinfo(self): # Return information about the selected atom for the msgbar # [mark 2004-10-14] # bruce 041217 revised XYZ format to %.2f, added bad-valence info # (for the same atoms as self.bad(), but in case conditions are added to # that, using independent code). if self == self.molecule.assy.ppa2: return xyz...
try: ainfo += (". Distance between %s-%s is %.2f." % \ (self, self.molecule.assy.ppa2, vlen(self.posn()-self.molecule.assy.ppa2.posn()))) except: pass
try: ainfo += (". Distance between %s-%s is %.3f." % \ (self, self.molecule.assy.ppa2, vlen(self.posn()-self.molecule.assy.ppa2.posn()))) except: print_compact_traceback("bug, fyi: ignoring exception in atom distance computation: ") pass
def getinfo(self): # Return information about the selected atom for the msgbar # [mark 2004-10-14] # bruce 041217 revised XYZ format to %.2f, added bad-valence info # (for the same atoms as self.bad(), but in case conditions are added to # that, using independent code). if self == self.molecule.assy.ppa2: return xyz...
v1 = norm(self.posn()-self.molecule.assy.ppa2.posn()) v2 = norm(self.molecule.assy.ppa3.posn()-self.molecule.assy.ppa2.posn()) ang = acos(dot(v1,v2)) * 180/pi try: ainfo += (" Angle for %s-%s-%s is %.2f degrees." %\ (self, self.molecule.assy.ppa2, self.molecule.assy.ppa3, ang)) except: pass
try: v1 = norm(self.posn()-self.molecule.assy.ppa2.posn()) v2 = norm(self.molecule.assy.ppa3.posn()-self.molecule.assy.ppa2.posn()) ang = acos(dot(v1,v2)) * 180/pi ainfo += (" Angle for %s-%s-%s is %.2f degrees." %\ (self, self.molecule.assy.ppa2, self.molecule.assy.ppa3, ang)) except: print_compact_traceback("bug, f...
def getinfo(self): # Return information about the selected atom for the msgbar # [mark 2004-10-14] # bruce 041217 revised XYZ format to %.2f, added bad-valence info # (for the same atoms as self.bad(), but in case conditions are added to # that, using independent code). if self == self.molecule.assy.ppa2: return xyz...
elem(0, "X", "Singlet", 0.001, 1.1, 1, 0), elem(1, "H", "Hydrogen", 1.6737, 1.2, 1, 30),
elem(0, "X", "Singlet", 17.000, 1.1, 1, 0), elem(1, "H", "Hydrogen", 1.6737, 0.77, 1, 30),
def prec(self): # /* mass rvdw evdw nbonds symbol */ # {0.100, 0.5, 0.130, 1, "X"}, /* 0 Singlet */ evd = evdw.get(self.symbol, 0.3+self.eltnum**2/190.0) lis = self.mass, self.rvdw, evd, self.bonds, self.symbol rec = ' {%7.3f, %5.2f, %6.3f, %d, "%s"}, ' % lis print rec+' //', self.name
elem(3, "Li", "Lithium", 11.525, 4.0, 1, 152), elem(4, "Be", "Beryllium", 14.964, 3.0, 2, 114), elem(5, "B", "Boron", 17.949, 2.0, 3, 83), elem(6, "C", "Carbon", 19.925, 1.84, 4, 77), elem(7, "N", "Nitrogen", 23.257, 1.55, 3, 70), elem(8, "O", "Oxygen", 26.565, 1.74, 2, 66), elem(9, "F", "...
elem(3, "Li", "Lithium", 11.525, 0.97, 1, 152), elem(4, "Be", "Beryllium", 14.964, 1.10, 2, 114), elem(5, "B", "Boron", 17.949, 1.46, 3, 83), elem(6, "C", "Carbon", 19.925, 1.43, 4, 77), elem(7, "N", "Nitrogen", 23.257, 1.39, 3, 70), elem(8, "O", "Oxygen", 26.565, 1.35, 2, 66), elem(9, "F",...
def prec(self): # /* mass rvdw evdw nbonds symbol */ # {0.100, 0.5, 0.130, 1, "X"}, /* 0 Singlet */ evd = evdw.get(self.symbol, 0.3+self.eltnum**2/190.0) lis = self.mass, self.rvdw, evd, self.bonds, self.symbol rec = ' {%7.3f, %5.2f, %6.3f, %d, "%s"}, ' % lis print rec+' //', self.name
elem(11, "Na", "Sodium", 38.1726, 4.0, 1, 186), elem(12, "Mg", "Magnesium", 40.356, 3.0, 2, 160), elem(13, "Al", "Aluminum", 44.7997, 2.5, 3, 125), elem(14, "Si", "Silicon", 46.6245, 2.25, 4, 117), elem(15, "P", "Phosphorus", 51.429, 2.11, 3, 110), elem(16, "S", "Sulfur", 53.233, 2.11, 2, 104), elem(...
elem(11, "Na", "Sodium", 38.1726, 1.29, 1, 186), elem(12, "Mg", "Magnesium", 40.356, 1.15, 2, 160), elem(13, "Al", "Aluminum", 44.7997, 2.0, 3, 125), elem(14, "Si", "Silicon", 46.6245, 1.82, 4, 116), elem(15, "P", "Phosphorus", 51.429, 1.78, 3, 110), elem(16, "S", "Sulfur", 53.233, 1.74, 2, 104), ele...
def prec(self): # /* mass rvdw evdw nbonds symbol */ # {0.100, 0.5, 0.130, 1, "X"}, /* 0 Singlet */ evd = evdw.get(self.symbol, 0.3+self.eltnum**2/190.0) lis = self.mass, self.rvdw, evd, self.bonds, self.symbol rec = ' {%7.3f, %5.2f, %6.3f, %d, "%s"}, ' % lis print rec+' //', self.name
elem(19, "K", "Potassium", 64.9256, 5.0, 1, 231), elem(20, "Ca", "Calcium", 66.5495, 4.0, 2, 197), elem(21, "Sc", "Scandium", 74.646, 3.7, 0, 60), elem(22, "Ti", "Titanium", 79.534, 3.5, 0, 147), elem(23, "V", "Vanadium", 84.584, 3.3, 0, 132), elem(24, "Cr", "Chromium", 86.335, 3.1, 0, 125), elem(25, ...
elem(19, "K", "Potassium", 64.9256, 1.59, 1, 231), elem(20, "Ca", "Calcium", 66.5495, 1.27, 2, 197), elem(21, "Sc", "Scandium", 74.646, 2.0, 0, 60), elem(22, "Ti", "Titanium", 79.534, 2.0, 0, 147), elem(23, "V", "Vanadium", 84.584, 2.0, 0, 132), elem(24, "Cr", "Chromium", 86.335, 2.0, 0, 125), elem(25...
def prec(self): # /* mass rvdw evdw nbonds symbol */ # {0.100, 0.5, 0.130, 1, "X"}, /* 0 Singlet */ evd = evdw.get(self.symbol, 0.3+self.eltnum**2/190.0) lis = self.mass, self.rvdw, evd, self.bonds, self.symbol rec = ' {%7.3f, %5.2f, %6.3f, %d, "%s"}, ' % lis print rec+' //', self.name
for el in Mendeleev[1:]:
for el in Mendeleev:
def prec(self): # /* mass rvdw evdw nbonds symbol */ # {0.100, 0.5, 0.130, 1, "X"}, /* 0 Singlet */ evd = evdw.get(self.symbol, 0.3+self.eltnum**2/190.0) lis = self.mass, self.rvdw, evd, self.bonds, self.symbol rec = ' {%7.3f, %5.2f, %6.3f, %d, "%s"}, ' % lis print rec+' //', self.name
for el2 in Mendeleev[1:]:
for el2 in Mendeleev:
def prec(self): # /* mass rvdw evdw nbonds symbol */ # {0.100, 0.5, 0.130, 1, "X"}, /* 0 Singlet */ evd = evdw.get(self.symbol, 0.3+self.eltnum**2/190.0) lis = self.mass, self.rvdw, evd, self.bonds, self.symbol rec = ' {%7.3f, %5.2f, %6.3f, %d, "%s"}, ' % lis print rec+' //', self.name
ks = 200*de*b**2
ks = min(200*de*b**2, 1000)
def prec(self): # /* mass rvdw evdw nbonds symbol */ # {0.100, 0.5, 0.130, 1, "X"}, /* 0 Singlet */ evd = evdw.get(self.symbol, 0.3+self.eltnum**2/190.0) lis = self.mass, self.rvdw, evd, self.bonds, self.symbol rec = ' {%7.3f, %5.2f, %6.3f, %d, "%s"}, ' % lis print rec+' //', self.name
bondrec(8,14, 550.0, 162.6, 0.89, 1.757)
bondrec(8,14, 550.0, 162.0, 0.89, 1.757)
def bondrec(n1,n2, ks, r0, de, b): #print r0, pertab[n1].rcovalent+pertab[n2].rcovalent #print ks, 200*de*b**2 #print r0,de, b,0.4+125/(r0*de) #print r0, de, 1-r0*0.0025 bontab[pertab[n1].symbol+pertab[n2].symbol] = (n1,n2, ks, r0, de, b)
for el1 in Mendeleev[1:]:
for el1 in Mendeleev:
def bondrec(n1,n2, ks, r0, de, b): #print r0, pertab[n1].rcovalent+pertab[n2].rcovalent #print ks, 200*de*b**2 #print r0,de, b,0.4+125/(r0*de) #print r0, de, 1-r0*0.0025 bontab[pertab[n1].symbol+pertab[n2].symbol] = (n1,n2, ks, r0, de, b)
for el2 in Mendeleev[1:]:
for el2 in Mendeleev:
def bondrec(n1,n2, ks, r0, de, b): #print r0, pertab[n1].rcovalent+pertab[n2].rcovalent #print ks, 200*de*b**2 #print r0,de, b,0.4+125/(r0*de) #print r0, de, 1-r0*0.0025 bontab[pertab[n1].symbol+pertab[n2].symbol] = (n1,n2, ks, r0, de, b)