print ' ' print 'Mismatch between provided temperature and temperature in the calculation' sys.exit() print 'The instanton mode is %s' % mode print 'The temperature is %f K' % (temp / K2au) if mode == 'rate': h0 = red2comp(hessian, nbeads, natoms) pos, nbeads, hessian2 = get_double(beads.q, nbeads, natoms, h0) hessian = hessian2 m3 = np.concatenate((beads.m3, beads.m3), axis=0) omega2 = (temp * nbeads * kb / hbar)**2 if not quiet: spring = SpringMapper.spring_hessian(natoms, nbeads, beads.m3[0], omega2, mode='full') h = np.add(hessian, spring) print 'The full ring polymer is made of %i' % (nbeads) print 'We used %i beads in the calculation.' % (nbeads / 2) elif mode == 'splitting': if input_freq == None: print 'Please provide a name of the file containing the list of the frequencies for the minimum using "-freq" flag' print '(You can generate that file using this script in the case reactant.)' sys.exit() print 'Our linear polymer has %i' % (nbeads) pos = beads.q m3 = beads.m3 omega2 = (temp * nbeads * kb / hbar)**2
if np.absolute(temp - temp2) / K2au > 2: print( "\n Mismatch between provided temperature and temperature in the calculation" ) sys.exit() if mode == "rate": h0 = red2comp(hessian, nbeads, natoms) pos, nbeads, hessian2 = get_double(beads.q, nbeads, natoms, h0) hessian = hessian2 m3 = np.concatenate((beads.m3, beads.m3), axis=0) omega2 = (temp * nbeads * kb / hbar) ** 2 if not quiet: spring = SpringMapper.spring_hessian( natoms, nbeads, beads.m3[0], omega2, mode="full" ) h = np.add(hessian, spring) elif mode == "splitting": if input_freq is None: print( 'Please provide a name of the file containing the list of the frequencies for the minimum using "-freq" flag' ) print(" You can generate that file using this script in the case reactant.") sys.exit() print(("Our linear polymer has {}".format(nbeads))) pos = beads.q m3 = beads.m3 omega2 = (temp * nbeads * kb / hbar) ** 2 # spring = SpringMapper.spring_hessian(natoms,nbeads,beads.m3[0],omega2,mode='half')
if np.absolute(temp - temp2) / K2au > 2: print ' ' print 'Mismatch between provided temperature and temperature in the calculation' sys.exit() print 'The instanton mode is %s' % mode print 'The temperature is %f K' % (temp / K2au) if mode == 'rate': h0 = red2comp(hessian, nbeads, natoms) pos, nbeads, hessian2 = get_double(beads.q, nbeads, natoms, h0) hessian = hessian2 m3 = np.concatenate((beads.m3, beads.m3), axis=0) omega2 = (temp * nbeads * kb / hbar) ** 2 if not quiet: spring = SpringMapper.spring_hessian(natoms, nbeads, beads.m3[0], omega2, mode='full') h = np.add(hessian, spring) print 'The full ring polymer is made of %i' % (nbeads) print 'We used %i beads in the calculation.' % (nbeads / 2) elif mode == 'splitting': if input_freq == None: print 'Please provide a name of the file containing the list of the frequencies for the minimum using "-freq" flag' print '(You can generate that file using this script in the case reactant.)' sys.exit() print 'Our linear polymer has %i' % (nbeads) pos = beads.q m3 = beads.m3 omega2 = (temp * nbeads * kb / hbar) ** 2 # spring = SpringMapper.spring_hessian(natoms,nbeads,beads.m3[0],omega2,mode='half') if not quiet: