def create_subs_peptide_charmm(filename, atomtypes=["CA"], frequency=1): """Create subsystem selection for CHARMM peptides Argument: | filename -- the CHARMM coordinate file (typically extension .crd or .cor) Optional argument: | atomtypes -- list of strings. Let only these atom types be part of the subsystem. | frequency -- let only one out of every *frequency* residues be part of the subsystem. """ N, calpha, proline, carbon, oxygen, nitrogen = load_peptide_info_charmm(filename) subs = [] if "C" in atomtypes: subs.extend(carbon[::frequency]) if "O" in atomtypes: subs.extend(oxygen[::frequency]) if "N" in atomtypes: subs.extend(nitrogen[::frequency]) if "CA" in atomtypes: subs.extend(calpha[::frequency]) if len(subs) == 0: raise NotImplementedError("No matching atom types found.") return subs
def create_subs_peptide_charmm(filename, atomtypes=["CA"], frequency=1): """Create subsystem selection for CHARMM peptides Argument: | filename -- the CHARMM coordinate file (typically extension .crd or .cor) Optional argument: | atomtypes -- list of strings. Let only these atom types be part of the subsystem. | frequency -- let only one out of every *frequency* residues be part of the subsystem. """ N, calpha, proline, carbon, oxygen, nitrogen = load_peptide_info_charmm( filename) subs = [] if "C" in atomtypes: subs.extend(carbon[::frequency]) if "O" in atomtypes: subs.extend(oxygen[::frequency]) if "N" in atomtypes: subs.extend(nitrogen[::frequency]) if "CA" in atomtypes: subs.extend(calpha[::frequency]) if len(subs) == 0: raise NotImplementedError("No matching atom types found.") return subs
def create_blocks_peptide_charmm(filename, label="normal", blocksize=1): """Create blocks list for CHARMM peptides Argument: | filename -- the CHARMM coordinate file (typically extension .crd or .cor) Optional argument: | label -- type of MBH blocks: RTB, dihedral, RHbending, normal [default=normal] | blocksize -- when using the RTB scheme, blocksize defines the number of residues in a block TODO: referenties """ N, calpha, proline, carbon, oxygen, nitrogen = load_peptide_info_charmm(filename) if label is "RTB": return _calc_blocks_RTB(blocksize, N, calpha, proline, carbon, oxygen, nitrogen) elif label is "dihedral": return _calc_blocks_dihedral(N, calpha, proline, carbon, oxygen, nitrogen) elif label is "RHbending": return _calc_blocks_RHbending(N, calpha, proline, carbon, oxygen, nitrogen) elif label is "normal": return _calc_blocks_normal(N, calpha, proline, carbon, oxygen, nitrogen) else: raise NotImplementedError
def create_blocks_peptide_charmm(filename, label="normal", blocksize=1): """Create blocks list for CHARMM peptides Argument: | filename -- the CHARMM coordinate file (typically extension .crd or .cor) Optional argument: | label -- type of MBH blocks: RTB, dihedral, RHbending, normal [default=normal] | blocksize -- when using the RTB scheme, blocksize defines the number of residues in a block TODO: referenties """ N, calpha, proline, carbon, oxygen, nitrogen = load_peptide_info_charmm( filename) if label is "RTB": return _calc_blocks_RTB(blocksize, N, calpha, proline, carbon, oxygen, nitrogen) elif label is "dihedral": return _calc_blocks_dihedral(N, calpha, proline, carbon, oxygen, nitrogen) elif label is "RHbending": return _calc_blocks_RHbending(N, calpha, proline, carbon, oxygen, nitrogen) elif label is "normal": return _calc_blocks_normal(N, calpha, proline, carbon, oxygen, nitrogen) else: raise NotImplementedError