Example #1
0
for lo in logs:
    print lo
    # in- / output filenames
    loid = lo[:-4]
    lostr = currdir + "/" + lo
    xyzstr = currdir + "/" + adddir + "/" + loid + "_XYZ.dat"
    chrgstr = currdir + "/" + adddir + "/" + loid + "_CHRG.dat"
    enerstr = currdir + "/" + adddir + "/" + loid + "_ENER.dat"
    xyzfi = open(xyzstr, "w")
    chrgfi = open(chrgstr, "w")
    enerfi = open(enerstr, "w")

    #####################
    # Check termination #
    #####################
    tmp, tmp1 = ui.croptt(tt=lostr, startstr="Normal termination", this=True)
    if tmp != []:
        print tmp1
    else:
        print "! .log probably not complete !"
    #################
    # CROP XYZ DATA #
    #################
    atm, tmp = ui.croptt(tt=lostr, startstr="Charge", finishstr="NAtoms", colstr="1")
    xyz, tmp = ui.croptt(
        tt=lostr, startstr="Standard orientation:", startatknock=-1, finishstr="Rotational", skipstr="-----"
    )
    if xyz == []:
        xyz, tmp = ui.croptt(
            tt=lostr, startstr="Z-Matrix orientation:", startatknock=-1, finishstr="Rotational", skipstr="------"
        )
Example #2
0
import ui

tt = raw_input(' -> ')

ctsp, ctcp = ui.croptt(tt = tt,  startstr = "H ", startatknock = -1)

to = open('connectivity.dat','w')
to.writelines(ctcp)
to.close()



Example #3
0
for lo in logs:
    print lo
    # in- / output filenames
    loid = lo[:-4]
    lostr = currdir + "/" + lo
    xyzstr = currdir + "/" + adddir + "/" + loid + "_XYZ.dat"
    chrgstr = currdir + "/" + adddir + "/" + loid + "_CHRG.dat"
    enerstr = currdir + "/" + adddir + "/" + loid + "_ENER.dat"
    xyzfi = open(xyzstr, 'w')
    chrgfi = open(chrgstr, 'w')
    enerfi = open(enerstr, 'w')

    #####################
    # Check termination #
    #####################
    tmp, tmp1 = ui.croptt(tt=lostr, startstr='Normal termination', this=True)
    if tmp != []:
        print tmp1
    else:
        print "! .log probably not complete !"
    #################
    # CROP XYZ DATA #
    #################
    atm, tmp = ui.croptt(tt=lostr,
                         startstr='Charge',
                         finishstr='NAtoms',
                         colstr='1')
    xyz, tmp = ui.croptt(tt=lostr,
                         startstr='Standard orientation:',
                         startatknock=-1,
                         finishstr='Rotational',