def is_protein(self, ff=''): ''' Returns true if standard amino acid residues are present ''' aa = util.get_available_res(ff).intersection(self.mol_data['resname']) return len(aa) > 0
assert args.water_model in ['opc', 'tip3p', 'spce', 'tip4'], 'Unknown water \ model %s\n' % args.water_model if args.water_model == 'opc': args.water_model = 'leaprc.water.opc' elif args.water_model == 'tip3p': args.water_model = 'leaprc.water.tip3p' elif args.water_model == 'spce': args.water_model = 'leaprc.water.spce' elif args.water_model == 'tip4': args.water_model = 'leaprc.water.tip4pew' #do we have nonstandard residues? mol_data = {} nonstandard_res = {} standard_res = util.get_available_res(ff) #pdb4amber seems to delete mercury (HG) along with hydrogens; for now my #hacky fix is to store the relevant atom info if mercury is present and add #the mercury back in after stripping...I'm preemptively doing this for #hafnium too metal_info = {} #if any structure was not provided in PDB format, we will attempt to create #one from what was provided using obabel, choosing a filename that will not #overwrite anything in the directory (optionally) for structure in args.structures: net_charge = None #the "structure" string in the args.structure list will be updated so #that it corresponds to the PDB we should use for subsequent steps assert os.path.isfile(structure), '%s does not exist\n' % structure #"base" is the base filename (no extension) from which others will be derived
assert args.water_model in ['opc', 'tip3p', 'spce', 'tip4'], 'Unknown water \ model %s\n' % args.water_model if args.water_model == 'opc': args.water_model = 'leaprc.water.opc' elif args.water_model == 'tip3p': args.water_model = 'leaprc.water.tip3p' elif args.water_model == 'spce': args.water_model = 'leaprc.water.spce' elif args.water_model == 'tip4': args.water_model = 'leaprc.water.tip4pew' #do we have nonstandard residues? mol_data = {} nonstandard_res = {} standard_res = util.get_available_res(ff) ff = [ff] if nff: standard_res = standard_res.union(util.get_available_res(nff)) ff = ff.append(nff) #pdb4amber seems to delete mercury (HG) along with hydrogens; for now my #hacky fix is to store the relevant atom info if mercury is present and add #the mercury back in after stripping...I'm preemptively doing this for #hafnium too metal_info = {} #if any structure was not provided in PDB format, we will attempt to create #one from what was provided using obabel, choosing a filename that will not #overwrite anything in the directory (optionally) for structure in args.structures: net_charge = None