def set_from_gts(self,gtsfile): if not os.path.exists(gtsfile): return # read file self._gts = gtsfile xcc,atonums,ch,mtp,E,gcc,Fcc,masses,pgroup,rotsigma,freq_list = read_gtsfile(self._gts) # set variables self.setvar(xcc=xcc,gcc=gcc,Fcc=Fcc) self.setvar(atonums=atonums,masses=masses) self.setvar(ch=ch,mtp=mtp,V0=E,pgroup=pgroup,rotsigma=rotsigma) # Prepare system self.prepare() # only for developers: freq list if freq_list is not None and len(freq_list) != 0: self._ccfreqs = freq_list
def get_min_V0(self): self._lV0 = [] self._lpg = [] for idx, (itc, weight) in enumerate(self._itcs): gts = self.gtsfile(itc) if not os.path.exists(gts): self._lV0 = [] break #exception = Exc.NoGTSfile(Exception) #exception._var = gts #raise exception gtsdata = read_gtsfile(gts) # save energy and point group self._lV0.append(gtsdata[4]) self._lpg.append(gtsdata[8]) if len(self._lV0) != 0: self._V0 = min(self._lV0)
def get_min_V0(self): self._lV0 = [] self._lpg = [] min_V0 = float("inf") min_itc = None for idx, (itc, weight) in enumerate(self._itcs): gts = self.gtsfile(itc) if not os.path.exists(gts): self._lV0 = [] break #exception = Exc.NoGTSfile(Exception) #exception._var = gts #raise exception gtsdata = read_gtsfile(gts) V0 = gtsdata[4] pg = gtsdata[8] # minimum? if V0 < min_V0: min_V0, min_itc = V0, itc # save energy and point group self._lV0.append(V0) self._lpg.append(pg) if min_itc is not None: self._V0 = min_V0 self._itcminV0 = min_itc