本文整理汇总了Python中General.myerror方法的典型用法代码示例。如果您正苦于以下问题:Python General.myerror方法的具体用法?Python General.myerror怎么用?Python General.myerror使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类General
的用法示例。
在下文中一共展示了General.myerror方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: import General [as 别名]
# 或者: from General import myerror [as 别名]
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()