示例#1
0
#######################################################################
#                                                                     #
# This utility prints the amino acid decomposition for a given prmtop #
#                                                                     #
#    Written by Jason Swails, 04/26/2010                              #
#                                                                     #
#######################################################################

import sys, utilities

if len(sys.argv) != 2 or '-help' in sys.argv[1]:
    print 'AA_decomp.py <prmtop> || <pdb>'
    sys.exit()

if sys.argv[1].lower().endswith("pdb"):
    residue_decomp = utilities.getresdecmp_pdb(sys.argv[1])
else:
    residue_decomp = utilities.getresdecmp_prmtop(sys.argv[1])
# residue indices are : ALA, ARG, ASN, ASP, CYS, GLU, GLN, GLY
#                       HIS, ILE, LEU, LYS, MET, PHE, PRO, SER
#                       THR, TRP, VAL, WAT, UNK

print 'ALA:     ' + str(residue_decomp[0])
print 'ARG:     ' + str(residue_decomp[1])
print 'ASN:     ' + str(residue_decomp[2])
print 'ASP:     ' + str(residue_decomp[3])
print 'CYS:     ' + str(residue_decomp[4])
print 'GLU:     ' + str(residue_decomp[5])
print 'GLN:     ' + str(residue_decomp[6])
print 'GLY:     ' + str(residue_decomp[7])
print 'HIS:     ' + str(residue_decomp[8])
示例#2
0
#                                                                     #
# This utility prints the amino acid decomposition for a given prmtop #
#                                                                     #
#    Written by Jason Swails, 04/26/2010                              #
#                                                                     #
#######################################################################


import sys, utilities

if len(sys.argv) != 2 or '-help' in sys.argv[1]:
   print 'AA_decomp.py <prmtop> || <pdb>'
   sys.exit()

if sys.argv[1].lower().endswith("pdb"):
   residue_decomp = utilities.getresdecmp_pdb(sys.argv[1])
else:
   residue_decomp = utilities.getresdecmp_prmtop(sys.argv[1])
# residue indices are : ALA, ARG, ASN, ASP, CYS, GLU, GLN, GLY
#                       HIS, ILE, LEU, LYS, MET, PHE, PRO, SER
#                       THR, TRP, VAL, WAT, UNK

print 'ALA:     ' + str(residue_decomp[0])
print 'ARG:     ' + str(residue_decomp[1])
print 'ASN:     ' + str(residue_decomp[2])
print 'ASP:     ' + str(residue_decomp[3])
print 'CYS:     ' + str(residue_decomp[4])
print 'GLU:     ' + str(residue_decomp[5])
print 'GLN:     ' + str(residue_decomp[6])
print 'GLY:     ' + str(residue_decomp[7])
print 'HIS:     ' + str(residue_decomp[8])
示例#3
0
        sys.exit()
    leapfile.write("l = loadpdb " + pdb + "\n")
    infiles = True

#### END INPUT FILE TYPES ####
if not infiles:
    print "Error: You have not specified any structures!"
    leapfile.close()
    os.system("rm -f py_leap.in")
    sys.exit()

if ci == 1:
    leapfile.write("addIons l Na+\n")
elif ci == 2:
    if pdb != "":
        residue_decmp = utilities.getresdecmp_pdb(pdb)

    if len(residue_decmp) == 0:
        print "Not ready yet..."
        leapfile.close()
        os.system("rm -f py_leap.in")
        sys.exit()

    leapfile.write("addIons l Na+ " + str(residue_decmp[21]) +          \
             " Cl- " + str(residue_decmp[20]) + "\n")

if sol > 0:
    leapfile.write("solvateOct l TIP3PBOX " + str(sol) + "\n")

if radii != "" and cph == "no":
    leapfile.write("set default PBRadii " + radii + "\n")
示例#4
0
    leapfile.write("l = loadpdb " + pdb + "\n")
    infiles = True


#### END INPUT FILE TYPES ####
if not infiles:
    print "Error: You have not specified any structures!"
    leapfile.close()
    os.system("rm -f py_leap.in")
    sys.exit()

if ci == 1:
    leapfile.write("addIons l Na+\n")
elif ci == 2:
    if pdb != "":
        residue_decmp = utilities.getresdecmp_pdb(pdb)

    if len(residue_decmp) == 0:
        print "Not ready yet..."
        leapfile.close()
        os.system("rm -f py_leap.in")
        sys.exit()

    leapfile.write("addIons l Na+ " + str(residue_decmp[21]) + " Cl- " + str(residue_decmp[20]) + "\n")

if sol > 0:
    leapfile.write("solvateOct l TIP3PBOX " + str(sol) + "\n")

if radii != "" and cph == "no":
    leapfile.write("set default PBRadii " + radii + "\n")