if torComb.energy > sysInfo.max_energy():
        subprocess.Popen(["rm",torComb.filename])
        return
        
    #Perform minimization
    torComb.min_energy = TTEnergy.get_minimum_energy(torComb.filename)
    print torComb.filename,torComb.min_energy
    
    #Clean up some files
    subprocess.Popen(["mv",torComb.filename+"_2",torComb.filename])
    
if __name__ == '__main__':
    #SET UP DATASTRUCTURES    
    #Generate an array of atom objects
    sysInfo = SysInfo(raw_input("Filename of Tinker XYZ coordinate file: "))
    atoms = TTFiles.get_xyz(sysInfo.startFile)
    
    #Evaluate energy of starting structure to obtain a reference point
    sysInfo.startEnergy = TTEnergy.get_single_point_energy(sysInfo.startFile)

    #Generate an array of torsion objects
    torsions = assign_torsions(atoms)    

    #Populate system info & list of possible torsion angles
    sysInfo.nTors = len(torsions)
    while (not sysInfo.deltaPhiStatus):
        sysInfo.deltaPhi = float(raw_input("Delta Phi - Angle step size:  "))
        sysInfo.deltaPhiStatus = check_deltaPhi(sysInfo.deltaPhi)
        if not sysInfo.deltaPhiStatus:
            print "\n------------------------------------------"
            print "Delta phi does not divide evenly into 360."
Exemple #2
0
        subprocess.Popen(["rm", torComb.filename])
        return

    #Perform minimization
    torComb.min_energy = TTEnergy.get_minimum_energy(torComb.filename)
    print torComb.filename, torComb.min_energy

    #Clean up some files
    subprocess.Popen(["mv", torComb.filename + "_2", torComb.filename])


if __name__ == '__main__':
    #SET UP DATASTRUCTURES
    #Generate an array of atom objects
    sysInfo = SysInfo(raw_input("Filename of Tinker XYZ coordinate file: "))
    atoms = TTFiles.get_xyz(sysInfo.startFile)

    #Evaluate energy of starting structure to obtain a reference point
    sysInfo.startEnergy = TTEnergy.get_single_point_energy(sysInfo.startFile)

    #Generate an array of torsion objects
    torsions = assign_torsions(atoms)

    #Populate system info & list of possible torsion angles
    sysInfo.nTors = len(torsions)
    while (not sysInfo.deltaPhiStatus):
        sysInfo.deltaPhi = float(raw_input("Delta Phi - Angle step size:  "))
        sysInfo.deltaPhiStatus = check_deltaPhi(sysInfo.deltaPhi)
        if not sysInfo.deltaPhiStatus:
            print "\n------------------------------------------"
            print "Delta phi does not divide evenly into 360."