Example #1
0
parser.add_argument('--rmsd', type = float)
parser.add_argument('--bbrmsd', type = float)
parser.add_argument('--nohomo', help = 'a file with the information of homologous protein to exclude')
parser.add_argument('--uniq',action = 'store_true')
parser.add_argument('--nonat', action = 'store_true')
parser.add_argument('--oh', required = True, dest ='ohead')
parser.add_argument('--smart', action = 'store_true')

args = parser.parse_args()

# parameters required for using smart rmsd cutoff from Craig
# rmsdmax, perLen = 1,1, 15

# dependencies between arguments
if (args.rmsd == None) and (args.bbrmsd == None) and (args.nohomo == None) and (not args.uniq) and (not args.smart):
    raise General.myerror('I am doing nothing...')
if (args.uniq == False) and (args.nonat == True):
    raise General.myerror('cannot specify nonat without uniq')
if args.ohead == args.head:
    raise General.myerror('after process the head name is the same, not allowed...')

pid = args.pdb.split('_')[0]
matchf = args.head+'_'+General.changeExt(args.pdb, 'match')
seqf = General.changeExt(matchf, 'seq')

conres = PDB.ConRes(args.pdb)

# if using smart rmsd cutoff, need to create a list in which each element is the length of a segment
if args.smart:
    resnums = [r.getResnum() for r in conres]
    resnums.sort()