bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,500
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,501
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,502
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,503
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,504
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,505
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,506
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,507
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,508
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,509
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,510
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,511
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,512
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,513
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,514
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,515
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32...
454,516
def _CopyCompiler(From, To): CreateDirectory(To) from_cm3 = os.path.join(From, "cm3") from_cm3exe = os.path.join(From, "cm3.exe") from_cm3cg = os.path.join(From, "cm3cg") from_cm3cgexe = os.path.join(From, "cm3cg.exe") if (Config != "NT386" and not FileExists(from_cm3) and not FileExists(from_cm3exe) and not FileExi...
def _CopyCompiler(From, To): CreateDirectory(To) from_cm3 = os.path.join(From, "cm3") from_cm3exe = os.path.join(From, "cm3.exe") from_cm3cg = os.path.join(From, "cm3cg") from_cm3cgexe = os.path.join(From, "cm3cg.exe") if ( not FileExists(from_cm3) and not FileExists(from_cm3exe) and not FileExists(from_cm3cg...
454,517
def _CopyCompiler(From, To): CreateDirectory(To) from_cm3 = os.path.join(From, "cm3") from_cm3exe = os.path.join(From, "cm3.exe") from_cm3cg = os.path.join(From, "cm3cg") from_cm3cgexe = os.path.join(From, "cm3cg.exe") if (Config != "NT386" and not FileExists(from_cm3) and not FileExists(from_cm3exe) and not FileExi...
def _CopyCompiler(From, To): CreateDirectory(To) from_cm3 = os.path.join(From, "cm3") from_cm3exe = os.path.join(From, "cm3.exe") from_cm3cg = os.path.join(From, "cm3cg") from_cm3cgexe = os.path.join(From, "cm3cg.exe") if (Config != "NT386" and not FileExists(from_cm3) and not FileExists(from_cm3exe) and not FileExi...
454,518
def SetupEnvironment(): SystemDrive = os.environ.get("SystemDrive", "") if os.environ.get("OS") == "Windows_NT": HostIsNT = True else: HostIsNT = False SystemDrive = os.environ.get("SYSTEMDRIVE") if SystemDrive: SystemDrive += os.path.sep # Do this earlier so that its link isn't a problem. # Looking in the registry H...
def SetupEnvironment(): SystemDrive = os.environ.get("SYSTEMDRIVE") if SystemDrive: SystemDrive += os.path.sep # Do this earlier so that its link isn't a problem. # Looking in the registry HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2 # would be reasonable here. if CM3IsCygwin: _SetupEnvironmentVariab...
454,519
def SetupEnvironment(): SystemDrive = os.environ.get("SystemDrive", "") if os.environ.get("OS") == "Windows_NT": HostIsNT = True else: HostIsNT = False SystemDrive = os.environ.get("SYSTEMDRIVE") if SystemDrive: SystemDrive += os.path.sep # Do this earlier so that its link isn't a problem. # Looking in the registry H...
def SetupEnvironment(): SystemDrive = os.environ.get("SystemDrive", "") if os.environ.get("OS") == "Windows_NT": HostIsNT = True else: HostIsNT = False SystemDrive = os.environ.get("SYSTEMDRIVE") if SystemDrive: SystemDrive += os.path.sep # Do this earlier so that its link isn't a problem. # Looking in the registry H...
454,520
def SetupEnvironment(): SystemDrive = os.environ.get("SystemDrive", "") if os.environ.get("OS") == "Windows_NT": HostIsNT = True else: HostIsNT = False SystemDrive = os.environ.get("SYSTEMDRIVE") if SystemDrive: SystemDrive += os.path.sep # Do this earlier so that its link isn't a problem. # Looking in the registry H...
def SetupEnvironment(): SystemDrive = os.environ.get("SystemDrive", "") if os.environ.get("OS") == "Windows_NT": HostIsNT = True else: HostIsNT = False SystemDrive = os.environ.get("SYSTEMDRIVE") if SystemDrive: SystemDrive += os.path.sep # Do this earlier so that its link isn't a problem. # Looking in the registry H...
454,521
def SetupEnvironment(): SystemDrive = os.environ.get("SystemDrive", "") if os.environ.get("OS") == "Windows_NT": HostIsNT = True else: HostIsNT = False SystemDrive = os.environ.get("SYSTEMDRIVE") if SystemDrive: SystemDrive += os.path.sep # Do this earlier so that its link isn't a problem. # Looking in the registry H...
def SetupEnvironment(): SystemDrive = os.environ.get("SystemDrive", "") if os.environ.get("OS") == "Windows_NT": HostIsNT = True else: HostIsNT = False SystemDrive = os.environ.get("SYSTEMDRIVE") if SystemDrive: SystemDrive += os.path.sep # Do this earlier so that its link isn't a problem. # Looking in the registry H...
454,522
def SetupEnvironment(): SystemDrive = os.environ.get("SystemDrive", "") if os.environ.get("OS") == "Windows_NT": HostIsNT = True else: HostIsNT = False SystemDrive = os.environ.get("SYSTEMDRIVE") if SystemDrive: SystemDrive += os.path.sep # Do this earlier so that its link isn't a problem. # Looking in the registry H...
def SetupEnvironment(): SystemDrive = os.environ.get("SystemDrive", "") if os.environ.get("OS") == "Windows_NT": HostIsNT = True else: HostIsNT = False SystemDrive = os.environ.get("SYSTEMDRIVE") if SystemDrive: SystemDrive += os.path.sep # Do this earlier so that its link isn't a problem. # Looking in the registry H...
454,523
def HandleDir(state, dir): for a in os.listdir(dir): b = os.path.join(dir, a) if isdir(b): wix.write("""<Directory Id='d%d' Name='%s'>\n""" % (state.dirID, ConvertPathForWin32(a))) state.dirID += 1 HandleDir(state, b) # recursion! wix.write("</Directory>\n") else: wix.write("""<Component Id='c%s' Guid='%s'>\n""" % (str...
def HandleDir(state, dir): for a in os.listdir(dir): b = os.path.join(dir, a) if isdir(b): wix.write("""<Directory Id='d%d' Name='%s'>\n""" % (state.dirID, ConvertPathForWin32(a))) state.dirID += 1 HandleDir(state, b) # recursion! wix.write("</Directory>\n") else: wix.write("""<Component Id='c%s' Guid='%s'>\n""" % (str...
454,524
def HandleDir(state, dir): for a in os.listdir(dir): b = os.path.join(dir, a) if isdir(b): wix.write("""<Directory Id='d%d' Name='%s'>\n""" % (state.dirID, ConvertPathForWin32(a))) state.dirID += 1 HandleDir(state, b) # recursion! wix.write("</Directory>\n") else: wix.write("""<Component Id='c%s' Guid='%s'>\n""" % (str...
def HandleDir(state, dir): for a in os.listdir(dir): b = os.path.join(dir, a) if isdir(b): wix.write("""<Directory Id='d%d' Name='%s'>\n""" % (state.dirID, ConvertPathForWin32(a))) state.dirID += 1 HandleDir(state, b) # recursion! wix.write("</Directory>\n") else: wix.write("""<Component Id='c%s' Guid='%s'>\n""" % (str...
454,525
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Target Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. SunCompile = "/usr/ccs/bin/cc -g -mt -xcode=pic32 -xldscope=symbolic " GnuCo...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Target Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. SunCompile = "/usr/ccs/bin/cc -g -mt -xcode=pic32 -xldscope=symbolic " GnuCo...
454,526
def _CleanupEnvironment(): # pylib.py figures these out correctly and in particular # their forms have to change if we upgrade from NT386 # to I386_CYGWIN or vice versa; reloading pylib.py # handles that for a in ["M3CONFIG", "CM3_INSTALL", "CM3_ROOT"]: if os.environ.get(a): del(os.environ[a])
def _CleanupEnvironment(): # pylib.py figures these out correctly and in particular # their forms have to change if we upgrade from NT386 # to I386_CYGWIN or vice versa; reloading pylib.py # handles that for a in ["M3CONFIG", "CM3_INSTALL", "CM3_ROOT"]: if os.environ.get(a): del(os.environ[a])
454,527
def ConvertPathForCM3(a): return _ConvertFromCygwinPath(a)
def ConvertPathForCM3(a): return _ConvertFromCygwinPath(a)
454,528
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = CM3VERSION + "-" + time.strftime("%Y%m%d") # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # p...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = CM3VERSION + "-" + time.strftime("%Y%m%d") # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # p...
454,529
def GetVersion(Key): # # Only read the file if an environment variable is "missing" (they # usually all are, ok), and only read it once. # #print("WriteVariablesIntoEnvironment:3") Value = Versions.get(Key) if Value: return Value # # CM3VERSION d5.7.1 # CM3VERSIONNUM 050701 # CM3LASTCHANGED 2009-01-21 # RegExp = re.com...
def GetVersion(Key): # # Only read the file if an environment variable is "missing" (they # usually all are, ok), and only read it once. # #print("WriteVariablesIntoEnvironment:3") Value = Versions.get(Key) if Value: return Value # # CM3VERSION d5.7.1 # CM3VERSIONNUM 050701 # CM3LASTCHANGED 2009-01-21 # RegExp = re.com...
454,530
def GetVersion(Key): # # Only read the file if an environment variable is "missing" (they # usually all are, ok), and only read it once. # #print("WriteVariablesIntoEnvironment:3") Value = Versions.get(Key) if Value: return Value # # CM3VERSION d5.7.1 # CM3VERSIONNUM 050701 # CM3LASTCHANGED 2009-01-21 # RegExp = re.com...
def GetVersion(Key): # # Only read the file if an environment variable is "missing" (they # usually all are, ok), and only read it once. # #print("WriteVariablesIntoEnvironment:3") Value = Versions.get(Key) if Value: return Value # # CM3VERSION d5.7.1 # CM3VERSIONNUM 050701 # CM3LASTCHANGED 2009-01-21 # RegExp = re.com...
454,531
def GetVersion(Key): # # Only read the file if an environment variable is "missing" (they # usually all are, ok), and only read it once. # #print("WriteVariablesIntoEnvironment:3") Value = Versions.get(Key) if Value: return Value # # CM3VERSION d5.7.1 # CM3VERSIONNUM 050701 # CM3LASTCHANGED 2009-01-21 # RegExp = re.com...
def GetVersion(Key): # # Only read the file if an environment variable is "missing" (they # usually all are, ok), and only read it once. # #print("WriteVariablesIntoEnvironment:3") Value = Versions.get(Key) if Value: return Value # # CM3VERSION d5.7.1 # CM3VERSIONNUM 050701 # CM3LASTCHANGED 2009-01-21 # RegExp = re.com...
454,532
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Target Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. SunCompile = "/usr/ccs/bin/cc -g -mt -xcode=pic32 -xldscope=symbolic " GnuCo...
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Target Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. SunCompile = "/usr/ccs/bin/cc -g -mt -xcode=pic32 -xldscope=symbolic " GnuCo...
454,533
def _CleanupEnvironment(): # pylib.py figures these out correctly and in particular # their forms have to change if we upgrade from NT386 # to NT386GNU or vice versa; reloading pylib.py # handles that for a in ["M3CONFIG", "CM3_INSTALL", "CM3_ROOT"]: if os.environ.get(a): del(os.environ[a])
def _CleanupEnvironment(): # pylib.py figures these out correctly and in particular # their forms have to change if we upgrade from NT386 # to NT386GNU or vice versa; reloading pylib.py # handles that for a in ["M3CONFIG", "CM3_INSTALL", "CM3_ROOT"]: if os.environ.get(a): del(os.environ[a])
454,534
def _CleanupEnvironment(): # pylib.py figures these out correctly and in particular # their forms have to change if we upgrade from NT386 # to NT386GNU or vice versa; reloading pylib.py # handles that for a in ["M3CONFIG", "CM3_INSTALL", "CM3_ROOT"]: if os.environ.get(a): del(os.environ[a])
def _CleanupEnvironment(): # pylib.py figures these out correctly and in particular # their forms have to change if we upgrade from NT386 # to NT386GNU or vice versa; reloading pylib.py # handles that for a in ["M3CONFIG", "CM3_INSTALL", "CM3_ROOT"]: if os.environ.get(a): del(os.environ[a])
454,535
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) self.questItemIds = range(1632, 1635) + range(1636,1642) + [1622, 1623]
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) self.questItemIds = range(1632, 1635) + range(1636,1642) + [1622, 1623]
454,536
def onKill(self,npc,player,isPet): st = player.getQuestState(qn) if not st : return if st.getState() != State.STARTED : return npcId = npc.getNpcId() if npcId == 20389 : st.set("id","0") if st.getInt("cond") and st.getQuestItemsCount(SILVERYS_RING) == 1 and st.getQuestItemsCount(RATMAN_TOOTH) < 10 : if st.getRandom(10)...
def onKill(self,npc,player,isPet): st = player.getQuestState(qn) if not st : return if st.getState() != State.STARTED : return npcId = npc.getNpcId() if npcId == 20389 : st.set("id","0") if st.getInt("cond") and st.getQuestItemsCount(SILVERYS_RING) == 1 and st.getQuestItemsCount(RATMAN_TOOTH) < 10 : if st.getRandom(10)...
454,537
def onTalk (self, npc, player) : htmltext = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>" st = player.getQuestState(qn) if not st : return htmltext
def onTalk (self, npc, player) : htmltext = Quest.getNoQuestMsg(player) st = player.getQuestState(qn) if not st : return htmltext
454,538
def initialize(self, atoms): self.par = {} self.rc = 0.0 self.numbers = atoms.get_atomic_numbers() for Z in self.numbers: if Z not in self.par: p = parameters[chemical_symbols[Z]] s0 = p[1] * Bohr eta2 = p[3] / Bohr kappa = p[4] / Bohr rc = beta * s0 * 0.5 * (sqrt(3) + sqrt(4)) x = eta2 * beta * s0 gamma1 = 0.0 gamma2 ...
def initialize(self, atoms): self.par = {} self.rc = 0.0 self.numbers = atoms.get_atomic_numbers() for Z in self.numbers: if Z not in self.par: p = parameters[chemical_symbols[Z]] s0 = p[1] * Bohr eta2 = p[3] / Bohr kappa = p[4] / Bohr x = eta2 * beta * s0 gamma1 = 0.0 gamma2 = 0.0 if p[7] == 'fcc': for i, n in enumera...
454,539
def initialize(self, atoms): self.par = {} self.rc = 0.0 self.numbers = atoms.get_atomic_numbers() for Z in self.numbers: if Z not in self.par: p = parameters[chemical_symbols[Z]] s0 = p[1] * Bohr eta2 = p[3] / Bohr kappa = p[4] / Bohr rc = beta * s0 * 0.5 * (sqrt(3) + sqrt(4)) x = eta2 * beta * s0 gamma1 = 0.0 gamma2 ...
def initialize(self, atoms): self.par = {} self.rc = 0.0 self.numbers = atoms.get_atomic_numbers() for Z in self.numbers: if Z not in self.par: p = parameters[chemical_symbols[Z]] s0 = p[1] * Bohr eta2 = p[3] / Bohr kappa = p[4] / Bohr rc = beta * s0 * 0.5 * (sqrt(3) + sqrt(4)) x = eta2 * beta * s0 gamma1 = 0.0 gamma2 ...
454,540
def initialize(self, atoms): self.par = {} self.rc = 0.0 self.numbers = atoms.get_atomic_numbers() for Z in self.numbers: if Z not in self.par: p = parameters[chemical_symbols[Z]] s0 = p[1] * Bohr eta2 = p[3] / Bohr kappa = p[4] / Bohr rc = beta * s0 * 0.5 * (sqrt(3) + sqrt(4)) x = eta2 * beta * s0 gamma1 = 0.0 gamma2 ...
def initialize(self, atoms): self.par = {} self.rc = 0.0 self.numbers = atoms.get_atomic_numbers() for Z in self.numbers: if Z not in self.par: p = parameters[chemical_symbols[Z]] s0 = p[1] * Bohr eta2 = p[3] / Bohr kappa = p[4] / Bohr rc = beta * s0 * 0.5 * (sqrt(3) + sqrt(4)) x = eta2 * beta * s0 gamma1 = 0.0 gamma2 ...
454,541
def initialize(self, atoms): self.par = {} self.rc = 0.0 self.numbers = atoms.get_atomic_numbers() for Z in self.numbers: if Z not in self.par: p = parameters[chemical_symbols[Z]] s0 = p[1] * Bohr eta2 = p[3] / Bohr kappa = p[4] / Bohr rc = beta * s0 * 0.5 * (sqrt(3) + sqrt(4)) x = eta2 * beta * s0 gamma1 = 0.0 gamma2 ...
def initialize(self, atoms): self.par = {} self.rc = 0.0 self.numbers = atoms.get_atomic_numbers() for Z in self.numbers: if Z not in self.par: p = parameters[chemical_symbols[Z]] s0 = p[1] * Bohr eta2 = p[3] / Bohr kappa = p[4] / Bohr rc = beta * s0 * 0.5 * (sqrt(3) + sqrt(4)) x = eta2 * beta * s0 gamma1 = 0.0 gamma2 ...
454,542
def initialize(self, atoms): self.par = {} self.rc = 0.0 self.numbers = atoms.get_atomic_numbers() for Z in self.numbers: if Z not in self.par: p = parameters[chemical_symbols[Z]] s0 = p[1] * Bohr eta2 = p[3] / Bohr kappa = p[4] / Bohr rc = beta * s0 * 0.5 * (sqrt(3) + sqrt(4)) x = eta2 * beta * s0 gamma1 = 0.0 gamma2 ...
def initialize(self, atoms): self.par = {} self.rc = 0.0 self.numbers = atoms.get_atomic_numbers() for Z in self.numbers: if Z not in self.par: p = parameters[chemical_symbols[Z]] s0 = p[1] * Bohr eta2 = p[3] / Bohr kappa = p[4] / Bohr rc = beta * s0 * 0.5 * (sqrt(3) + sqrt(4)) x = eta2 * beta * s0 gamma1 = 0.0 gamma2 ...
454,543
def initialize(self, atoms): self.par = {} self.rc = 0.0 self.numbers = atoms.get_atomic_numbers() for Z in self.numbers: if Z not in self.par: p = parameters[chemical_symbols[Z]] s0 = p[1] * Bohr eta2 = p[3] / Bohr kappa = p[4] / Bohr rc = beta * s0 * 0.5 * (sqrt(3) + sqrt(4)) x = eta2 * beta * s0 gamma1 = 0.0 gamma2 ...
def initialize(self, atoms): self.par = {} self.rc = 0.0 self.numbers = atoms.get_atomic_numbers() for Z in self.numbers: if Z not in self.par: p = parameters[chemical_symbols[Z]] s0 = p[1] * Bohr eta2 = p[3] / Bohr kappa = p[4] / Bohr rc = beta * s0 * 0.5 * (sqrt(3) + sqrt(4)) x = eta2 * beta * s0 gamma1 = 0.0 gamma2 ...
454,544
def calculate(self, atoms): self.positions = atoms.get_positions().copy() self.cell = atoms.get_cell().copy() self.pbc = atoms.get_pbc().copy() icell = np.linalg.inv(self.cell) scaled = np.dot(self.positions, icell) N = [] for i in range(3): if self.pbc[i]: scaled[:, i] %= 1.0 v = icell[:, i] h = 1 / sqrt(np.dot(v, v)...
def calculate(self, atoms): self.positions = atoms.get_positions().copy() self.cell = atoms.get_cell().copy() self.pbc = atoms.get_pbc().copy() icell = np.linalg.inv(self.cell) scaled = np.dot(self.positions, icell) N = [] for i in range(3): if self.pbc[i]: scaled[:, i] %= 1.0 v = icell[:, i] h = 1 / sqrt(np.dot(v, v)...
454,545
def calculate(self, atoms): self.positions = atoms.get_positions().copy() self.cell = atoms.get_cell().copy() self.pbc = atoms.get_pbc().copy() icell = np.linalg.inv(self.cell) scaled = np.dot(self.positions, icell) N = [] for i in range(3): if self.pbc[i]: scaled[:, i] %= 1.0 v = icell[:, i] h = 1 / sqrt(np.dot(v, v)...
def calculate(self, atoms): self.positions = atoms.get_positions().copy() self.cell = atoms.get_cell().copy() self.pbc = atoms.get_pbc().copy() icell = np.linalg.inv(self.cell) scaled = np.dot(self.positions, icell) N = [] for i in range(3): if self.pbc[i]: scaled[:, i] %= 1.0 v = icell[:, i] h = 1 / sqrt(np.dot(v, v)...
454,546
def calculate(self, atoms): self.positions = atoms.get_positions().copy() self.cell = atoms.get_cell().copy() self.pbc = atoms.get_pbc().copy() icell = np.linalg.inv(self.cell) scaled = np.dot(self.positions, icell) N = [] for i in range(3): if self.pbc[i]: scaled[:, i] %= 1.0 v = icell[:, i] h = 1 / sqrt(np.dot(v, v)...
def calculate(self, atoms): self.positions = atoms.get_positions().copy() self.cell = atoms.get_cell().copy() self.pbc = atoms.get_pbc().copy() icell = np.linalg.inv(self.cell) scaled = np.dot(self.positions, icell) N = [] for i in range(3): if self.pbc[i]: scaled[:, i] %= 1.0 v = icell[:, i] h = 1 / sqrt(np.dot(v, v)...
454,547
def calculate(self, atoms): self.positions = atoms.get_positions().copy() self.cell = atoms.get_cell().copy() self.pbc = atoms.get_pbc().copy() icell = np.linalg.inv(self.cell) scaled = np.dot(self.positions, icell) N = [] for i in range(3): if self.pbc[i]: scaled[:, i] %= 1.0 v = icell[:, i] h = 1 / sqrt(np.dot(v, v)...
def calculate(self, atoms): self.positions = atoms.get_positions().copy() self.cell = atoms.get_cell().copy() self.pbc = atoms.get_pbc().copy() icell = np.linalg.inv(self.cell) scaled = np.dot(self.positions, icell) N = [] for i in range(3): if self.pbc[i]: scaled[:, i] %= 1.0 v = icell[:, i] h = 1 / sqrt(np.dot(v, v)...
454,548
def interact1(self, a1, a2, d, r, p, ksi): x = exp(acut * (r - p['rc'])) theta = 1.0 / (1.0 + x) y = (0.5 * p['V0'] * exp(-p['kappa'] * (r / beta - p['s0'])) * ksi / p['gamma2'] * theta) self.energy -= y f = y * (p['kappa'] / beta + acut * theta * x) * d / r self.forces[a1] += f self.forces[a2] -= f self.sigma1[a1] += ...
def interact1(self, a1, a2, d, r, p, ksi): x = exp(acut * (r - p['rc'])) theta = 1.0 / (1.0 + x) y = (0.5 * p1['V0'] * exp(-p2['kappa'] * (r / beta - p2['s0'])) * ksi / p1['gamma2'] * theta) self.energy -= y f = y * (p['kappa'] / beta + acut * theta * x) * d / r self.forces[a1] += f self.forces[a2] -= f self.sigma1[a1]...
454,549
def interact1(self, a1, a2, d, r, p, ksi): x = exp(acut * (r - p['rc'])) theta = 1.0 / (1.0 + x) y = (0.5 * p['V0'] * exp(-p['kappa'] * (r / beta - p['s0'])) * ksi / p['gamma2'] * theta) self.energy -= y f = y * (p['kappa'] / beta + acut * theta * x) * d / r self.forces[a1] += f self.forces[a2] -= f self.sigma1[a1] += ...
def interact1(self, a1, a2, d, r, p, ksi): x = exp(acut * (r - p['rc'])) theta = 1.0 / (1.0 + x) y = (0.5 * p['V0'] * exp(-p['kappa'] * (r / beta - p['s0'])) * ksi / p['gamma2'] * theta) self.energy -= y f = y * (p2['kappa'] / beta + self.acut * theta * x) * d / r self.forces[a1] += f self.forces[a2] -= f self.sigma1[a...
454,550
def interact1(self, a1, a2, d, r, p, ksi): x = exp(acut * (r - p['rc'])) theta = 1.0 / (1.0 + x) y = (0.5 * p['V0'] * exp(-p['kappa'] * (r / beta - p['s0'])) * ksi / p['gamma2'] * theta) self.energy -= y f = y * (p['kappa'] / beta + acut * theta * x) * d / r self.forces[a1] += f self.forces[a2] -= f self.sigma1[a1] += ...
def interact1(self, a1, a2, d, r, p, ksi): x = exp(acut * (r - p['rc'])) theta = 1.0 / (1.0 + x) y = (0.5 * p['V0'] * exp(-p['kappa'] * (r / beta - p['s0'])) * ksi / p['gamma2'] * theta) self.energy -= y f = y * (p['kappa'] / beta + acut * theta * x) * d / r self.forces[a1] += f self.forces[a2] -= f self.sigma1[a1] += ...
454,551
def interact2(self, a1, a2, d, r, p, ksi): x = exp(acut * (r - p['rc'])) theta = 1.0 / (1.0 + x) y = (exp(-p['eta2'] * (r - beta * p['s0'])) * ksi / p['gamma1'] * theta * self.deds[a1]) f = y * (p['eta2'] + acut * theta * x) * d / r self.forces[a1] -= f self.forces[a2] += f
def interact2(self, a1, a2, d, r, p, ksi): x = exp(acut * (r - p['rc'])) theta = 1.0 / (1.0 + x) y = (exp(-p2['eta2'] * (r - beta * p2['s0'])) * ksi / p1['gamma1'] * theta * self.deds[a1]) f = y * (p2['eta2'] + self.acut * theta * x) * d / r self.forces[a1] -= f self.forces[a2] += f
454,552
def __init__(self): self.atoms = None
def __init__(self): self.atoms = None
454,553
def restart_load(self): """Method which is called upon restart.""" # Try to read sorting file if os.path.isfile('ase-sort.dat'): self.sort = [] self.resort = [] file = open('ase-sort.dat', 'r') lines = file.readlines() file.close() for line in lines: data = line.split() self.sort.append(int(data[0])) self.resort.appen...
def restart_load(self): """Method which is called upon restart.""" # Try to read sorting file if os.path.isfile('ase-sort.dat'): self.sort = [] self.resort = [] file = open('ase-sort.dat', 'r') lines = file.readlines() file.close() for line in lines: data = line.split() self.sort.append(int(data[0])) self.resort.appen...
454,554
def get_dipole_moment(self, atoms): """Returns total dipole moment of the system.""" self.update(atoms) return self.dipole
def get_dipole_moment(self, atoms): """Returns total dipole moment of the system.""" self.update(atoms) return self.dipole
454,555
def __init__(self, nc='out.nc', outnc=None, debug=0, stay_alive=False, **kwargs): ''' Initialize the Jacapo calculator
def __init__(self, nc='out.nc', outnc=None, debug=0, stay_alive=False, **kwargs): ''' Initialize the Jacapo calculator
454,556
def set_kpts(self, kpts): ''' set the kpt grid.
def set_kpts(self, kpts): ''' set the kpt grid.
454,557
def set_kpts(self, kpts): ''' set the kpt grid.
def set_kpts(self, kpts): ''' set the kpt grid.
454,558
def get_ensemble_coefficients(self): ''' adapted from ASE/dacapo.py def GetEnsembleCoefficients(self): self.Calculate() E = self.GetPotentialEnergy() xc = self.GetNetCDFEntry('EnsembleXCEnergies') Exc = xc[0] exc_c = self.GetNetCDFEntry('EvaluateCorrelationEnergy') exc_e = self.GetNetCDFEntry('EvaluateExchangeEnergy')...
def get_ensemble_coefficients(self): ''' adapted from ASE/dacapo.py def GetEnsembleCoefficients(self): self.Calculate() E = self.GetPotentialEnergy() xc = self.GetNetCDFEntry('EnsembleXCEnergies') Exc = xc[0] exc_c = self.GetNetCDFEntry('EvaluateCorrelationEnergy') exc_e = self.GetNetCDFEntry('EvaluateExchangeEnergy')...
454,559
def read_only_atoms(self,ncfile): '''read only the atoms from an existing netcdf file. Used to initialize a calculator from a ncfilename.
def read_only_atoms(self,ncfile): '''read only the atoms from an existing netcdf file. Used to initialize a calculator from a ncfilename.
454,560
def cut(atoms, a=(1,0,0), b=(0,1,0), c=(0,0,1), origo=(0,0,0), nlayers=None, extend=1.0, tolerance=0.001): """Cuts out a cell defined by *a*, *b*, *c* and *origo* from a sufficiently repeated copy of *atoms*. Typically, this function is used to create slabs of different sizes and orientations. The vectors *a*, *b* and...
def>>> cut(atoms,>>> a=(1,0,0),>>> b=(0,1,0),>>> c=(0,0,1),>>> origo=(0,0,0),>>> nlayers=None,>>> extend=1.0,>>> tolerance=0.001):>>> """Cuts>>> out>>> a>>> cell>>> defined>>> by>>> *a*,>>> *b*,>>> *c*>>> and>>> *origo*>>> from>>> a>>> sufficiently>>> repeated>>> copy>>> of>>> *atoms*.>>> >>> Typically,>>> this>>> func...
454,561
def cut(atoms, a=(1,0,0), b=(0,1,0), c=(0,0,1), origo=(0,0,0), nlayers=None, extend=1.0, tolerance=0.001): """Cuts out a cell defined by *a*, *b*, *c* and *origo* from a sufficiently repeated copy of *atoms*. Typically, this function is used to create slabs of different sizes and orientations. The vectors *a*, *b* and...
def>>> cut(atoms,>>> a=(1,0,0),>>> b=(0,1,0),>>> c=(0,0,1),>>> origo=(0,0,0),>>> nlayers=None,>>> extend=1.0,>>> tolerance=0.001):>>> """Cuts>>> out>>> a>>> cell>>> defined>>> by>>> *a*,>>> *b*,>>> *c*>>> and>>> *origo*>>> from>>> a>>> sufficiently>>> repeated>>> copy>>> of>>> *atoms*.>>> >>> Typically,>>> this>>> func...
454,562
def cut(atoms, a=(1,0,0), b=(0,1,0), c=(0,0,1), origo=(0,0,0), nlayers=None, extend=1.0, tolerance=0.001): """Cuts out a cell defined by *a*, *b*, *c* and *origo* from a sufficiently repeated copy of *atoms*. Typically, this function is used to create slabs of different sizes and orientations. The vectors *a*, *b* and...
def>>> cut(atoms,>>> a=(1,0,0),>>> b=(0,1,0),>>> c=(0,0,1),>>> origo=(0,0,0),>>> nlayers=None,>>> extend=1.0,>>> tolerance=0.001):>>> """Cuts>>> out>>> a>>> cell>>> defined>>> by>>> *a*,>>> *b*,>>> *c*>>> and>>> *origo*>>> from>>> a>>> sufficiently>>> repeated>>> copy>>> of>>> *atoms*.>>> >>> Typically,>>> this>>> func...
454,563
def cut(atoms, a=(1,0,0), b=(0,1,0), c=(0,0,1), origo=(0,0,0), nlayers=None, extend=1.0, tolerance=0.001): """Cuts out a cell defined by *a*, *b*, *c* and *origo* from a sufficiently repeated copy of *atoms*. Typically, this function is used to create slabs of different sizes and orientations. The vectors *a*, *b* and...
def>>> cut(atoms,>>> a=(1,0,0),>>> b=(0,1,0),>>> c=(0,0,1),>>> origo=(0,0,0),>>> nlayers=None,>>> extend=1.0,>>> tolerance=0.001):>>> """Cuts>>> out>>> a>>> cell>>> defined>>> by>>> *a*,>>> *b*,>>> *c*>>> and>>> *origo*>>> from>>> a>>> sufficiently>>> repeated>>> copy>>> of>>> *atoms*.>>> >>> Typically,>>> this>>> func...
454,564
def stack(atoms1, atoms2, axis=2, cell=None, fix=0.5, maxstrain=0.5, distance=None): """Return a new Atoms instance with *atoms2* added to atoms1 along the given axis. Periodicity in all directions is ensured. The size of the final cell is determined by *cell*, except that the length alongh *axis* will be the sum of *...
def>>> stack(atoms1,>>> atoms2,>>> axis=2,>>> cell=None,>>> fix=0.5,>>> maxstrain=0.5,>>> distance=None):>>> """Return>>> a>>> new>>> Atoms>>> instance>>> with>>> *atoms2*>>> added>>> to>>> atoms1>>> along>>> the>>> given>>> axis.>>> Periodicity>>> in>>> all>>> directions>>> is>>> ensured.>>> >>> The>>> size>>> of>>> t...
454,565
def stack(atoms1, atoms2, axis=2, cell=None, fix=0.5, maxstrain=0.5, distance=None): """Return a new Atoms instance with *atoms2* added to atoms1 along the given axis. Periodicity in all directions is ensured. The size of the final cell is determined by *cell*, except that the length alongh *axis* will be the sum of *...
def>>> stack(atoms1,>>> atoms2,>>> axis=2,>>> cell=None,>>> fix=0.5,>>> maxstrain=0.5,>>> distance=None):>>> """Return>>> a>>> new>>> Atoms>>> instance>>> with>>> *atoms2*>>> added>>> to>>> atoms1>>> along>>> the>>> given>>> axis.>>> Periodicity>>> in>>> all>>> directions>>> is>>> ensured.>>> >>> The>>> size>>> of>>> t...
454,566
def stack(atoms1, atoms2, axis=2, cell=None, fix=0.5, maxstrain=0.5, distance=None): """Return a new Atoms instance with *atoms2* added to atoms1 along the given axis. Periodicity in all directions is ensured. The size of the final cell is determined by *cell*, except that the length alongh *axis* will be the sum of *...
def>>> stack(atoms1,>>> atoms2,>>> axis=2,>>> cell=None,>>> fix=0.5,>>> maxstrain=0.5,>>> distance=None):>>> """Return>>> a>>> new>>> Atoms>>> instance>>> with>>> *atoms2*>>> added>>> to>>> atoms1>>> along>>> the>>> given>>> axis.>>> Periodicity>>> in>>> all>>> directions>>> is>>> ensured.>>> >>> The>>> size>>> of>>> t...
454,567
def stack(atoms1, atoms2, axis=2, cell=None, fix=0.5, maxstrain=0.5, distance=None): """Return a new Atoms instance with *atoms2* added to atoms1 along the given axis. Periodicity in all directions is ensured. The size of the final cell is determined by *cell*, except that the length alongh *axis* will be the sum of *...
def>>> stack(atoms1,>>> atoms2,>>> axis=2,>>> cell=None,>>> fix=0.5,>>> maxstrain=0.5,>>> distance=None):>>> """Return>>> a>>> new>>> Atoms>>> instance>>> with>>> *atoms2*>>> added>>> to>>> atoms1>>> along>>> the>>> given>>> axis.>>> Periodicity>>> in>>> all>>> directions>>> is>>> ensured.>>> >>> The>>> size>>> of>>> t...
454,568
def __eq__(self, other): """Chech whether *self* and *other* refer to the same spacegroup number and setting.""" return self.no == other.no and self.setting == other.setting
def __eq__(self, other): """Chech whether *self* and *other* refer to the same spacegroup number and setting.""" return self.no == other.no and self.setting == other.setting
454,569
def _read_datafile_entry(spg, no, symbol, setting, f): """Read space group data from f to spg.""" spg._no = no spg._symbol = symbol.strip() spg._setting = setting spg._centrosymmetric = bool(f.readline().split()[1]) # primitive vectors f.readline() spg._scaled_primitive_cell = np.array([map(float, f.readline().split())...
def _read_datafile_entry(spg, no, symbol, setting, f): """Read space group data from f to spg.""" spg._no = no spg._symbol = symbol.strip() spg._setting = setting spg._centrosymmetric = bool(int(f.readline().split()[1])) # primitive vectors f.readline() spg._scaled_primitive_cell = np.array([map(float, f.readline().spl...
454,570
def ados_changed(self,x): ados = self.get_ados()
def ados_changed(self,x): ados = self.get_ados()
454,571
def ados_changed(self,x): ados = self.get_ados()
def ados_changed(self,x): ados = self.get_ados()
454,572
def ados_changed(self,x): ados = self.get_ados()
defelif ados is not None and x is None: return True ados_changed(self,x):elif ados is not None and x is None: return True adoselif ados is not None and x is None: return True =elif ados is not None and x is None: return True self.get_ados()
454,573
def run_test(get_atoms, get_calculator, name, fmax=0.05, steps=100, plot=True): plotter = Plotter(name, fmax) csvwriter = CSVWriter(name) for optimizer in optimizers: note = '' logname = name + '-' + optimizer atoms = get_atoms() atoms.set_calculator(get_calculator()) opt = get_optimizer(optimizer) relax = opt(atoms,...
def run_test(get_atoms, get_calculator, name, fmax=0.05, steps=100, plot=True): plotter = Plotter(name, fmax) csvwriter = CSVWriter(name) for optimizer in optimizers: note = '' logname = name + '-' + optimizer atoms = get_atoms() atoms.set_calculator(get_calculator()) opt = get_optimizer(optimizer) relax = opt(atoms,...
454,574
def build(): p = OptionParser(usage='%prog [options] [ads@]surf [output file]', version='%prog 0.1', description='Example ads/surf: CO@2x2Ru0001') p.add_option('-l', '--layers', type='int', default=4, help='Number of layers.') p.add_option('-v', '--vacuum', type='float', default=5.0, help='Vacuum.') p.add_option('-x',...
def build(): p = OptionParser(usage='%prog [options] [ads@]surf [output file]', version='%prog 0.1', description='Example ads/surf: CO@2x2Ru0001') p.add_option('-l', '--layers', type='int', default=4, help='Number of layers.') p.add_option('-v', '--vacuum', type='float', default=5.0, help='Vacuum.') p.add_option('-x',...
454,575
def build(): p = OptionParser(usage='%prog [options] [ads@]surf [output file]', version='%prog 0.1', description='Example ads/surf: CO@2x2Ru0001') p.add_option('-l', '--layers', type='int', default=4, help='Number of layers.') p.add_option('-v', '--vacuum', type='float', default=5.0, help='Vacuum.') p.add_option('-x',...
def build(): p = OptionParser(usage='%prog [options] [ads@]surf [output file]', version='%prog 0.1', description='Example ads/surf: CO@2x2Ru0001') p.add_option('-l', '--layers', type='int', default=4, help='Number of layers.') p.add_option('-v', '--vacuum', type='float', default=5.0, help='Vacuum.') p.add_option('-x',...
454,576
def build(): p = OptionParser(usage='%prog [options] [ads@]surf [output file]', version='%prog 0.1', description='Example ads/surf: CO@2x2Ru0001') p.add_option('-l', '--layers', type='int', default=4, help='Number of layers.') p.add_option('-v', '--vacuum', type='float', default=5.0, help='Vacuum.') p.add_option('-x',...
def build(): p = OptionParser(usage='%prog [options] [ads@]surf [output file]', version='%prog 0.1', description='Example ads/surf: CO@2x2Ru0001') p.add_option('-l', '--layers', type='int', default=4, help='Number of layers.') p.add_option('-v', '--vacuum', type='float', default=5.0, help='Vacuum.') p.add_option('-x',...
454,577
def build(): p = OptionParser(usage='%prog [options] [ads@]surf [output file]', version='%prog 0.1', description='Example ads/surf: CO@2x2Ru0001') p.add_option('-l', '--layers', type='int', default=4, help='Number of layers.') p.add_option('-v', '--vacuum', type='float', default=5.0, help='Vacuum.') p.add_option('-x',...
def build(): p = OptionParser(usage='%prog [options] [ads@]surf [output file]', version='%prog 0.1', description='Example ads/surf: CO@2x2Ru0001') p.add_option('-l', '--layers', type='int', default=4, help='Number of layers.') p.add_option('-v', '--vacuum', type='float', default=5.0, help='Vacuum.') p.add_option('-x',...
454,578
def read(ncfile): '''return atoms and calculator from ncfile >>> atoms, calc = read('co.nc') ''' calc = Jacapo(ncfile) atoms = calc.get_atoms() #this returns a copy return (atoms, calc)
def read(ncfile): '''return atoms and calculator from ncfile >>> atoms, calc = read('co.nc') ''' calc = Jacapo(ncfile) atoms = calc.get_atoms() #this returns a copy return (atoms, calc)
454,579
def __init__(self, nc='out.nc', outnc=None, debug=0, stay_alive=False, **kwargs): ''' Initialize the Jacapo calculator
def __init__(self, nc='out.nc', outnc=None, debug=logging.WARN, stay_alive=False, **kwargs): ''' Initialize the Jacapo calculator
454,580
def __init__(self, nc='out.nc', outnc=None, debug=0, stay_alive=False, **kwargs): ''' Initialize the Jacapo calculator
def __init__(self, nc='out.nc', outnc=None, debug=0, stay_alive=False, **kwargs): ''' Initialize the Jacapo calculator
454,581
def __init__(self, nc='out.nc', outnc=None, debug=0, stay_alive=False, **kwargs): ''' Initialize the Jacapo calculator
def __init__(self, nc='out.nc', outnc=None, debug=0, stay_alive=False, **kwargs): ''' Initialize the Jacapo calculator
454,582
def __init__(self, nc='out.nc', outnc=None, debug=0, stay_alive=False, **kwargs): ''' Initialize the Jacapo calculator
def __init__(self, nc='out.nc', outnc=None, debug=0, stay_alive=False, **kwargs): ''' Initialize the Jacapo calculator
454,583
def set(self, **kwargs): '''set a parameter
def set(self, **kwargs): '''set a parameter
454,584
def set(self, **kwargs): '''set a parameter
def set(self, **kwargs): '''set a parameter
454,585
def set(self, **kwargs): '''set a parameter
defset(self,**kwargs):'''setaparameter
454,586
def set(self, **kwargs): '''set a parameter
def set(self, **kwargs): '''set a parameter
454,587
def write_input(self): '''write out input parameters as needed
def write_input(self): '''write out input parameters as needed
454,588
def update_input_parameters(self): '''read in all the input parameters from the netcdfile''' for key in self.valid_input: getf = 'self.get_%s()' % key if self.debug > 0: print 'getting ', key self.pars[key] = eval(getf) self.pars_uptodate[key] = True return self.pars
def update_input_parameters(self): '''read in all the input parameters from the netcdfile''' for key in self.valid_input: getf = 'self.get_%s()' % key log.debug('getting key: %s' % key) self.pars[key] = eval(getf) self.pars_uptodate[key] = True return self.pars
454,589
def initnc(self, ncfile): 'create an ncfile with minimal dimensions in it' if self.debug > 0: print 'initializing ', ncfile
def initnc(self, ncfile): 'create an ncfile with minimal dimensions in it' if self.debug > 0: print 'initializing ', ncfile
454,590
def _set_frame_number(self, frame=None): if frame is None: nc = netCDF(self.nc, 'r') if 'TotalEnergy' in nc.variables: frame = nc.variables['TotalEnergy'].shape[0] # make sure the last energy is reasonable. Sometime # the field is empty if the calculation ran out of # walltime for example. Empty values get returned as ...
def _set_frame_number(self, frame=None): if frame is None: nc = netCDF(self.nc, 'r') if 'TotalEnergy' in nc.variables: frame = nc.variables['TotalEnergy'].shape[0] # make sure the last energy is reasonable. Sometime # the field is empty if the calculation ran out of # walltime for example. Empty values get returned as ...
454,591
def _set_frame_number(self, frame=None): if frame is None: nc = netCDF(self.nc, 'r') if 'TotalEnergy' in nc.variables: frame = nc.variables['TotalEnergy'].shape[0] # make sure the last energy is reasonable. Sometime # the field is empty if the calculation ran out of # walltime for example. Empty values get returned as ...
def _set_frame_number(self, frame=None): if frame is None: nc = netCDF(self.nc, 'r') if 'TotalEnergy' in nc.variables: frame = nc.variables['TotalEnergy'].shape[0] # make sure the last energy is reasonable. Sometime # the field is empty if the calculation ran out of # walltime for example. Empty values get returned as ...
454,592
def _increment_frame(self): if self.debug > 1: print 'incrementing frame' self._frame += 1
def _increment_frame(self): log.debug('incrementing frame') self._frame += 1
454,593
def set_kpts(self, kpts): ''' set the kpt grid.
def set_kpts(self, kpts): ''' set the kpt grid.
454,594
def atoms_are_equal(self,atoms): ''' comparison of atoms to self.atoms using tolerances to account for float/double differences and float math. ''' TOL = 1.0e-6 #angstroms
def atoms_are_equal(self,atoms): ''' comparison of atoms to self.atoms using tolerances to account for float/double differences and float math. ''' TOL = 1.0e-6 #angstroms
454,595
def set_atoms(self, atoms): '''attach an atoms to the calculator and update the ncfile
def set_atoms(self, atoms): '''attach an atoms to the calculator and update the ncfile
454,596
def set_atoms(self, atoms): '''attach an atoms to the calculator and update the ncfile
def set_atoms(self, atoms): '''attach an atoms to the calculator and update the ncfile
454,597
def set_nc(self,nc='out.nc'): ''' set filename for the netcdf and text output for this calculation
def set_nc(self,nc='out.nc'): ''' set filename for the netcdf and text output for this calculation
454,598
def get_potential_energy(self,atoms=None,force_consistent=False): ''' return the potential energy. ''' if self.calculation_required(atoms): if self.debug > 0: print 'calculation required for energy' self.calculate() else: if self.debug > 0: print 'no calculation required for energy' nc = netCDF(self.get_nc(),'r') try:...
def get_potential_energy(self,atoms=None,force_consistent=False): ''' return the potential energy. ''' if self.calculation_required(atoms): log.debug('calculation required for energy') self.calculate() else: if self.debug > 0: print 'no calculation required for energy' nc = netCDF(self.get_nc(),'r') try: if force_cons...
454,599