diff --git a/scripts/rebuild_canonical_residue_pdbs_from_ccd.py b/scripts/rebuild_canonical_residue_pdbs_from_ccd.py new file mode 100644 index 00000000..f47fc89 --- /dev/null +++ b/scripts/rebuild_canonical_residue_pdbs_from_ccd.py @@ -0,0 +1,287 @@ +#!/usr/bin/env python +"""Rebuild residue PDB templates from RCSB CCD ideal coordinates. + +Uses ``chilife.bio_ccd`` ideal coordinates, preserves chiLife atom naming and +backbone orientation from the existing residue templates, then regenerates +``residue_internal_coords/*_ic.pkl`` files. + +Canonical amino acids use their own CCD entries. Protonation variants in +``alt_prot_states`` use the parent amino-acid CCD geometry (e.g. ASH from ASP) +with variant-specific atoms omitted when absent from the chiLife template. +""" + +from __future__ import annotations + +import argparse +import pickle +import re +from pathlib import Path + +import MDAnalysis as mda +import numpy as np + +import chilife +from chilife.globals import alt_prot_states, nataa_codes + +RL_DIR = chilife.RL_DIR +PDB_DIR = RL_DIR / "residue_pdbs" +IC_DIR = RL_DIR / "residue_internal_coords" + +SKIP_CCD_ATOMS = frozenset({"OXT", "HXT", "H2", "H3"}) + +# chiLife name -> CCD atom_id where automatic mapping fails +CHILIFE_TO_CCD_H = { + "GLY": {"HA": "HA2", "3HA": "HA3"}, +} + +# bio_ccd three-letter codes for alt states often name unrelated compounds; use parents. +ALT_CCD_SOURCE = dict(alt_prot_states) + +# Parent CCD atom_ids to drop when building an alt-state template +ALT_CCD_SKIP: dict[str, frozenset[str]] = { + "ASH": frozenset(), + "GLH": frozenset(), + "LYN": frozenset({"HZ3"}), + "CYM": frozenset({"HG"}), + "HID": frozenset({"HE2"}), + "HIE": frozenset({"HD1"}), + "HIP": frozenset(), + "TYM": frozenset({"HH"}), +} + + +def ccd_h_to_chilife(name: str) -> str: + """Map a CCD/PDB hydrogen name to chiLife's ``{n}H{anchor}`` style.""" + if name in ("H", "HA", "H2", "H3", "HZ"): + return name + match = re.match(r"^H([A-Z]+?\d*)(\d+)$", name) + if match: + return f"{match.group(2)}H{match.group(1)}" + return name + + +def kabsch(mobile: np.ndarray, target: np.ndarray) -> tuple[np.ndarray, np.ndarray]: + """Return ``R, t`` such that ``mobile @ R + t`` best matches ``target``.""" + mobile = np.asarray(mobile, dtype=float) + target = np.asarray(target, dtype=float) + mob_cent = mobile.mean(axis=0) + tgt_cent = target.mean(axis=0) + mob = mobile - mob_cent + tgt = target - tgt_cent + H = mob.T @ tgt + U, _, Vt = np.linalg.svd(H) + R = Vt.T @ U.T + if np.linalg.det(R) < 0: + Vt = Vt.copy() + Vt[-1, :] *= -1 + R = Vt.T @ U.T + t = tgt_cent - mob_cent @ R + return R, t + + +def ccd_positions( + ccd_resname: str, + ccd: dict, + *, + skip_atoms: frozenset[str] = SKIP_CCD_ATOMS, +) -> dict[str, np.ndarray]: + """Ideal Cartesian coordinates from ``bio_ccd`` (Angstrom).""" + if ccd_resname not in ccd: + raise KeyError(f"{ccd_resname} not in bio_ccd") + + atoms = ccd[ccd_resname]["chem_comp_atom"] + out: dict[str, np.ndarray] = {} + for i, atom_id in enumerate(atoms["atom_id"]): + if atom_id in skip_atoms: + continue + out[atom_id] = np.array( + [ + float(atoms["pdbx_model_Cartn_x_ideal"][i]), + float(atoms["pdbx_model_Cartn_y_ideal"][i]), + float(atoms["pdbx_model_Cartn_z_ideal"][i]), + ], + dtype=float, + ) + return out + + +def build_chilife_to_ccd_map( + resname: str, template_names: list[str], ccd_pos: dict[str, np.ndarray] +) -> dict[str, str]: + """Map each chiLife atom name in the template to a CCD ``atom_id``.""" + ccd_h_to_chi: dict[str, str] = {} + for ccd_name in ccd_pos: + if ccd_name[0] == "H" or ccd_name in ("H", "HA", "HZ"): + ccd_h_to_chi[ccd_name] = ccd_h_to_chilife(ccd_name) + + chi_to_ccd: dict[str, str] = {} + for name in template_names: + if name in ccd_pos: + chi_to_ccd[name] = name + continue + if name in CHILIFE_TO_CCD_H.get(resname, {}): + chi_to_ccd[name] = CHILIFE_TO_CCD_H[resname][name] + continue + for ccd_name, chi_name in ccd_h_to_chi.items(): + if chi_name == name: + chi_to_ccd[name] = ccd_name + break + else: + raise KeyError(f"{resname}: no CCD atom for chiLife name {name!r}") + return chi_to_ccd + + +def rebuild_residue( + resname: str, + ccd: dict, + pdb_dir: Path, + ic_dir: Path, + dry_run: bool = False, + *, + ccd_source: str | None = None, + skip_ccd_atoms: frozenset[str] | None = None, +) -> None: + res_lower = resname.lower() + template_path = pdb_dir / f"{res_lower}.pdb" + if not template_path.exists(): + raise FileNotFoundError(template_path) + + template = mda.Universe(str(template_path), in_memory=True) + template_names = [a.name.strip() for a in template.atoms] + ref_coords = {a.name.strip(): a.position.copy() for a in template.atoms} + + ccd_resname = ccd_source or resname + skip = SKIP_CCD_ATOMS | (skip_ccd_atoms or frozenset()) + ccd_pos = ccd_positions(ccd_resname, ccd, skip_atoms=skip) + chi_to_ccd = build_chilife_to_ccd_map(resname, template_names, ccd_pos) + + mobile_bb = np.vstack([ccd_pos[chi_to_ccd[x]] for x in ("N", "CA", "C")]) + target_bb = np.vstack([ref_coords[x] for x in ("N", "CA", "C")]) + R, t = kabsch(mobile_bb, target_bb) + + new_coords: dict[str, np.ndarray] = {} + for chi_name in template_names: + ccd_name = chi_to_ccd[chi_name] + new_coords[chi_name] = ccd_pos[ccd_name] @ R + t + + lines = [] + for i, name in enumerate(template_names): + atom = template.atoms[i] + coord = new_coords[name] + lines.append( + f"ATOM {i + 1:5d} {name:^4s} {resname:3s} {atom.chainID:1s}{int(atom.resid):4d} " + f"{coord[0]:8.3f}{coord[1]:8.3f}{coord[2]:8.3f}{1.0:6.2f}{1.0:6.2f} {atom.element:>2s} \n" + ) + + if dry_run: + print(f"{resname}: would write {template_path} ({len(lines)} atoms)") + return + + try: + sorted_lines = chilife.sort_pdb(lines) + except (IndexError, RuntimeError): + # Template atom order is already valid; some small protonation variants + # fail bond guessing during sort (e.g. ASH). + sorted_lines = lines + template_path.write_text("".join(sorted_lines)) + + struct = mda.Universe(str(template_path), in_memory=True) + pref_d = chilife.dihedral_defs[resname] + ICs = chilife.MolSysIC.from_atoms(struct, preferred_dihedrals=pref_d) + ic_path = ic_dir / f"{res_lower}_ic.pkl" + with open(ic_path, "wb") as f: + pickle.dump(ICs, f) + print(f"{resname}: wrote {template_path.name} and {ic_path.name}") + + +def _rebuild_targets( + resnames: list[str] | None, + *, + canonical: bool, + alt_states: bool, +) -> list[tuple[str, str | None, frozenset[str] | None]]: + """Return ``(template, ccd_source, skip_ccd_atoms)`` jobs to run.""" + jobs: list[tuple[str, str | None, frozenset[str] | None]] = [] + allowed: dict[str, tuple[str | None, frozenset[str] | None]] = {} + + if canonical: + for name in sorted(k for k in nataa_codes if len(k) == 3): + allowed[name] = (None, None) + + if alt_states: + for name in sorted(alt_prot_states): + allowed[name] = ( + ALT_CCD_SOURCE[name], + ALT_CCD_SKIP.get(name, frozenset()), + ) + + if not allowed: + raise SystemExit("Select --canonical, --alt-states, or --all") + + if resnames: + targets = [r.upper() for r in resnames] + unknown = set(targets) - set(allowed) + if unknown: + raise SystemExit(f"Unknown residue names: {sorted(unknown)}") + else: + targets = sorted(allowed) + + for name in targets: + source, skip = allowed[name] + jobs.append((name, source, skip)) + return jobs + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--res", + nargs="*", + help="Residue names to rebuild (default: all selected groups)", + ) + parser.add_argument( + "--canonical", + action="store_true", + help="Rebuild the 20 canonical amino acids", + ) + parser.add_argument( + "--alt-states", + action="store_true", + help="Rebuild canonical protonation variants (ASH, GLH, HID, ...)", + ) + parser.add_argument( + "--all", + action="store_true", + help="Rebuild canonical amino acids and protonation variants", + ) + parser.add_argument( + "--dry-run", + action="store_true", + help="Print actions without writing files", + ) + args = parser.parse_args() + + canonical = args.canonical or args.all + alt_states = args.alt_states or args.all + if not (canonical or alt_states): + canonical = True + + with open(chilife.DATA_DIR / "bio_ccd.pkl", "rb") as f: + ccd = pickle.load(f) + + for resname, ccd_source, skip_ccd_atoms in _rebuild_targets( + args.res, canonical=canonical, alt_states=alt_states + ): + rebuild_residue( + resname, + ccd, + PDB_DIR, + IC_DIR, + dry_run=args.dry_run, + ccd_source=ccd_source, + skip_ccd_atoms=skip_ccd_atoms, + ) + + +if __name__ == "__main__": + main() diff --git a/src/chilife/RotamerEnsemble.py b/src/chilife/RotamerEnsemble.py index f29e401..1c56111 100644 --- a/src/chilife/RotamerEnsemble.py +++ b/src/chilife/RotamerEnsemble.py @@ -253,7 +253,9 @@ def from_mda(cls, residue, **kwargs): if kwargs.get('use_H', False) and res in ralt_prot_states: - if res != 'HIS': + if res == 'TYR' and 'HH' not in residue.atoms.names: + res = ralt_prot_states[res].get(len(residue.atoms), res) + elif res != 'HIS': res = ralt_prot_states[res].get(len(residue.atoms), res) elif len(residue.atoms) == 18: res = 'HIP' diff --git a/src/chilife/__init__.py b/src/chilife/__init__.py index 2017444..cc2ad9f 100644 --- a/src/chilife/__init__.py +++ b/src/chilife/__init__.py @@ -44,4 +44,4 @@ # SpinLabel = SpinLabel.SpinLabel # dSpinLabel = dSpinLabel.dSpinLabel -__version__ = "1.2.3" +__version__ = "1.2.4" diff --git a/src/chilife/chilife.py b/src/chilife/chilife.py index 567d184..3df8ea0 100644 --- a/src/chilife/chilife.py +++ b/src/chilife/chilife.py @@ -36,7 +36,7 @@ from .alignment_methods import local_mx from .Topology import get_min_topol, guess_bonds from .pdb_utils import sort_pdb, get_backbone_atoms, get_bb_candidates -from .protein_utils import mutate, guess_mobile_dihedrals +from .protein_utils import mutate, guess_mobile_dihedrals, get_missing_residues, _mutation_ignore_sites from .MolSysIC import MolSysIC from .scoring import GAS_CONST, reweight_rotamers, ljEnergyFunc from .numba_utils import get_delta_r, normdist @@ -1705,15 +1705,15 @@ def repack( repack_res_kwargs["eval_clash"] = False - repack_residue_libraries = [ - RotamerEnsemble.from_mda(res, **repack_res_kwargs) - for res in repack_residues - if res.resname not in ["GLY", "ALA"] and res.resname in SUPPORTED_RESIDUES - ] - repack_residue_libraries += list(ensembles) - - # Create new labeled protein construct to fill in any missing atoms of repack residues - protein = mutate(protein, *repack_residue_libraries, **kwargs).atoms + fill_kwargs = {**kwargs, "add_missing_atoms": False, "rotamer_index": "closest"} + missing = get_missing_residues( + protein, + ignore=_mutation_ignore_sites(ensembles), + use_H=repack_res_kwargs.get("use_H", False), + ignore_waters=repack_res_kwargs.get("ignore_waters", True), + ) + if missing: + protein = mutate(protein, *missing, **fill_kwargs).atoms repack_residues = protein.select_atoms( f"around {repack_radius} {sites_str}" diff --git a/src/chilife/data/dihedral_defs.toml b/src/chilife/data/dihedral_defs.toml index 3f50642..680dd36 100644 --- a/src/chilife/data/dihedral_defs.toml +++ b/src/chilife/data/dihedral_defs.toml @@ -22,6 +22,7 @@ SER = [["N", "CA", "CB", "OG"]] THR = [["N", "CA", "CB", "OG1"]] TRP = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "CD1"]] TYR = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "CD1"]] +TYM = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "CD1"]] VAL = [["N", "CA", "CB", "CG1"]] R1C = [["N", "CA", "CB", "SG"], ["CA", "CB", "SG", "SD"], ["CB", "SG", "SD", "CE"], ["SG", "SD", "CE", "C3"], ["SD", "CE", "C3", "C2"]] CYR1 = [["N", "CA", "CB", "SG"], ["CA", "CB", "SG", "S1L"], ["CB", "SG", "S1L", "C1L"], ["SG", "S1L", "C1L", "C1R"], ["S1L", "C1L", "C1R", "C1"]] diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/ala_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/ala_ic.pkl index ca44512..7e9bf32 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/ala_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/ala_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/arg_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/arg_ic.pkl index bc081b6..b4bd6e2 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/arg_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/arg_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/ash_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/ash_ic.pkl index 0972e62..ed0d7d5 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/ash_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/ash_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/asn_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/asn_ic.pkl index 9d9448c..c3adeed 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/asn_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/asn_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/asp_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/asp_ic.pkl index 0ece4aa..ddc0a26 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/asp_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/asp_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/cym_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/cym_ic.pkl index 89edc89..55b3e3a 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/cym_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/cym_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/cys_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/cys_ic.pkl index 4136ff9..8fccb82 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/cys_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/cys_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/glh_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/glh_ic.pkl index d2c8769..6aea57e 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/glh_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/glh_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/gln_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/gln_ic.pkl index a917c98..a339e82 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/gln_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/gln_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/glu_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/glu_ic.pkl index 00c24a8..c53b5f2 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/glu_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/glu_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/gly_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/gly_ic.pkl index c16af1d..d45fa0d 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/gly_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/gly_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/hid_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/hid_ic.pkl index e4f0233..ffd4f92 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/hid_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/hid_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/hie_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/hie_ic.pkl index 6664a55..fd53098 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/hie_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/hie_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/hip_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/hip_ic.pkl index e16f201..9ff24e7 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/hip_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/hip_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/his_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/his_ic.pkl index 66768cc..7f3c698 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/his_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/his_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/ile_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/ile_ic.pkl index 59fe6e0..4e93739 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/ile_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/ile_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/leu_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/leu_ic.pkl index 616142d..c08ebf1 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/leu_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/leu_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/lyn_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/lyn_ic.pkl index eb4b124..d92d514 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/lyn_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/lyn_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/lys_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/lys_ic.pkl index facec0c..6675532 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/lys_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/lys_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/met_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/met_ic.pkl index 65e5368..df1354f 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/met_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/met_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/phe_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/phe_ic.pkl index 79c4024..e4130d4 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/phe_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/phe_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/pro_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/pro_ic.pkl index 15d144a..af7632b 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/pro_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/pro_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/remake_ics.py b/src/chilife/data/rotamer_libraries/residue_internal_coords/remake_ics.py index 3b1a0bc..1db1a11 100644 --- a/src/chilife/data/rotamer_libraries/residue_internal_coords/remake_ics.py +++ b/src/chilife/data/rotamer_libraries/residue_internal_coords/remake_ics.py @@ -1,26 +1,46 @@ -import MDAnalysis as mda +import argparse +import pickle from pathlib import Path + +import MDAnalysis as mda import chilife -import pickle -pdb_directory = Path('../residue_pdbs') -residue_pdbs = pdb_directory.glob('*.pdb') +parser = argparse.ArgumentParser(description="Rebuild residue *_ic.pkl files from residue_pdbs.") +parser.add_argument( + "--force", + action="store_true", + help="Overwrite existing *_ic.pkl files (default: skip existing).", +) +parser.add_argument( + "pdbs", + nargs="*", + help="Optional residue stems (e.g. trp ala). Default: all *.pdb in residue_pdbs.", +) +args = parser.parse_args() -for pdb in residue_pdbs: +pdb_directory = Path(__file__).resolve().parent.parent / "residue_pdbs" +if args.pdbs: + residue_pdbs = [pdb_directory / f"{stem}.pdb" for stem in args.pdbs] +else: + residue_pdbs = sorted(pdb_directory.glob("*.pdb")) - new_path = Path(pdb.stem + '_ic.pkl') - if new_path.exists(): +ic_directory = Path(__file__).resolve().parent + +for pdb in residue_pdbs: + new_path = ic_directory / f"{pdb.stem}_ic.pkl" + if new_path.exists() and not args.force: continue print(pdb.stem) srtd = chilife.sort_pdb(pdb) - with open(pdb, 'w') as f: + with open(pdb, "w") as f: f.writelines(srtd) struct = mda.Universe(str(pdb), in_memory=True) - pref_d = chilife.dihedral_defs[pdb.stem.upper()] + resname = pdb.stem.upper() + pref_d = chilife.dihedral_defs[resname] print(pref_d) ICs = chilife.MolSysIC.from_atoms(struct, preferred_dihedrals=pref_d) - with open(pdb.stem + '_ic.pkl', 'wb') as f: + with open(new_path, "wb") as f: pickle.dump(ICs, f) \ No newline at end of file diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/ser_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/ser_ic.pkl index 0bbe68e..6b8bd79 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/ser_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/ser_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/thr_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/thr_ic.pkl index 6eca97b..8fad62a 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/thr_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/thr_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/trp_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/trp_ic.pkl index e12d105..73b5e3b 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/trp_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/trp_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/tym_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/tym_ic.pkl new file mode 100644 index 00000000..87f1a51 Binary files /dev/null and b/src/chilife/data/rotamer_libraries/residue_internal_coords/tym_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/tyr_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/tyr_ic.pkl index 9abe846..bf6ccdb 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/tyr_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/tyr_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_internal_coords/val_ic.pkl b/src/chilife/data/rotamer_libraries/residue_internal_coords/val_ic.pkl index 3538955..8ca79ec 100644 Binary files a/src/chilife/data/rotamer_libraries/residue_internal_coords/val_ic.pkl and b/src/chilife/data/rotamer_libraries/residue_internal_coords/val_ic.pkl differ diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/ala.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/ala.pdb index 79e8e81..e1c42c8 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/ala.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/ala.pdb @@ -1,10 +1,10 @@ -ATOM 1 N ALA A 1 0.000 1.363 0.522 1.00 1.00 N -ATOM 2 CA ALA A 1 0.000 0.000 0.000 1.00 1.00 C -ATOM 3 C ALA A 1 0.000 -0.000 -1.510 1.00 1.00 C -ATOM 4 O ALA A 1 0.011 1.048 -2.166 1.00 1.00 O -ATOM 5 CB ALA A 1 -1.217 -0.728 0.596 1.00 1.00 C -ATOM 6 H ALA A 1 0.000 2.226 -0.127 1.00 1.00 H -ATOM 7 HA ALA A 1 0.928 -0.505 0.328 1.00 1.00 H -ATOM 8 3HB ALA A 1 -1.274 -1.779 0.259 1.00 1.00 H -ATOM 9 1HB ALA A 1 -1.181 -0.751 1.702 1.00 1.00 H -ATOM 10 2HB ALA A 1 -2.172 -0.243 0.314 1.00 1.00 H +ATOM 1 N ALA A 1 0.117 0.042 0.834 1.00 1.00 N +ATOM 2 CA ALA A 1 -0.116 1.008 -0.246 1.00 1.00 C +ATOM 3 C ALA A 1 -0.000 0.313 -1.576 1.00 1.00 C +ATOM 4 O ALA A 1 0.733 -0.637 -1.699 1.00 1.00 O +ATOM 5 CB ALA A 1 0.924 2.126 -0.162 1.00 1.00 C +ATOM 6 H ALA A 1 1.047 -0.324 0.701 1.00 1.00 H +ATOM 7 HA ALA A 1 -1.115 1.433 -0.143 1.00 1.00 H +ATOM 8 1HB ALA A 1 0.840 2.630 0.801 1.00 1.00 H +ATOM 9 2HB ALA A 1 1.922 1.701 -0.264 1.00 1.00 H +ATOM 10 3HB ALA A 1 0.751 2.845 -0.964 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/arg.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/arg.pdb index 30cbf6d..87dc104 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/arg.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/arg.pdb @@ -1,24 +1,24 @@ -ATOM 1 N ARG 1 -0.022 -3.647 2.514 1.00 0.00 N -ATOM 2 CA ARG 1 0.519 -2.968 1.340 1.00 0.00 C -ATOM 3 C ARG 1 2.029 -2.951 1.374 1.00 0.00 C -ATOM 4 O ARG 1 2.666 -3.478 2.283 1.00 0.00 O -ATOM 5 CB ARG 1 -0.063 -1.527 1.282 1.00 0.00 C -ATOM 6 CG ARG 1 0.188 -0.757 -0.045 1.00 0.00 C -ATOM 7 CD ARG 1 -0.388 0.668 -0.004 1.00 0.00 C -ATOM 8 NE ARG 1 -0.136 1.349 -1.308 1.00 0.00 N -ATOM 9 CZ ARG 1 -0.497 2.593 -1.608 1.00 0.00 C -ATOM 10 NH2 ARG 1 -0.215 3.048 -2.788 1.00 0.00 N -ATOM 11 NH1 ARG 1 -1.121 3.383 -0.780 1.00 0.00 N1+ -ATOM 12 H ARG 1 0.584 -4.045 3.240 1.00 0.00 H -ATOM 13 HA ARG 1 0.211 -3.538 0.443 1.00 0.00 H -ATOM 14 3HB ARG 1 -1.156 -1.569 1.465 1.00 0.00 H -ATOM 15 2HB ARG 1 0.336 -0.947 2.140 1.00 0.00 H -ATOM 16 2HG ARG 1 -0.252 -1.330 -0.887 1.00 0.00 H -ATOM 17 3HG ARG 1 1.276 -0.706 -0.255 1.00 0.00 H -ATOM 18 3HD ARG 1 -1.476 0.622 0.217 1.00 0.00 H -ATOM 19 2HD ARG 1 0.080 1.230 0.834 1.00 0.00 H -ATOM 20 HE ARG 1 0.348 0.865 -2.071 1.00 0.00 H -ATOM 21 2HH2 ARG 1 -0.502 4.005 -3.000 1.00 0.00 H -ATOM 22 1HH2 ARG 1 0.275 2.415 -3.423 1.00 0.00 H -ATOM 23 2HH1 ARG 1 -1.365 4.326 -1.087 1.00 0.00 H -ATOM 24 1HH1 ARG 1 -1.312 2.964 0.133 1.00 0.00 H +ATOM 1 N ARG 1 -0.001 -3.954 2.208 1.00 1.00 N +ATOM 2 CA ARG 1 0.786 -3.289 1.171 1.00 1.00 C +ATOM 3 C ARG 1 1.741 -2.323 1.849 1.00 1.00 C +ATOM 4 O ARG 1 1.782 -2.089 3.050 1.00 1.00 O +ATOM 5 CB ARG 1 -0.114 -2.584 0.145 1.00 1.00 C +ATOM 6 CG ARG 1 -0.958 -1.435 0.719 1.00 1.00 C +ATOM 7 CD ARG 1 -1.789 -0.732 -0.352 1.00 1.00 C +ATOM 8 NE ARG 1 -2.704 -1.652 -0.985 1.00 1.00 N +ATOM 9 CZ ARG 1 -3.590 -1.270 -2.007 1.00 1.00 C +ATOM 10 NH1 ARG 1 -4.453 -2.192 -2.588 1.00 1.00 N +ATOM 11 NH2 ARG 1 -3.608 0.049 -2.449 1.00 1.00 N +ATOM 12 H ARG 1 -0.582 -4.716 1.937 1.00 1.00 H +ATOM 13 HA ARG 1 1.385 -4.057 0.667 1.00 1.00 H +ATOM 14 2HB ARG 1 -0.781 -3.326 -0.312 1.00 1.00 H +ATOM 15 3HB ARG 1 0.514 -2.193 -0.667 1.00 1.00 H +ATOM 16 2HG ARG 1 -0.298 -0.690 1.180 1.00 1.00 H +ATOM 17 3HG ARG 1 -1.619 -1.813 1.508 1.00 1.00 H +ATOM 18 3HD ARG 1 -1.140 -0.279 -1.109 1.00 1.00 H +ATOM 19 2HD ARG 1 -2.370 0.075 0.108 1.00 1.00 H +ATOM 20 HE ARG 1 -2.734 -2.637 -0.695 1.00 1.00 H +ATOM 21 2HH1 ARG 1 -4.477 -3.165 -2.296 1.00 1.00 H +ATOM 22 1HH1 ARG 1 -5.094 -1.913 -3.329 1.00 1.00 H +ATOM 23 1HH2 ARG 1 -2.989 0.748 -2.046 1.00 1.00 H +ATOM 24 2HH2 ARG 1 -4.240 0.348 -3.189 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/ash.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/ash.pdb index 62e580b..ec338fc 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/ash.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/ash.pdb @@ -1,13 +1,13 @@ -ATOM 1 N ASH 1 -0.610 -1.825 -0.630 1.00 0.00 N -ATOM 2 CA ASH 1 -0.051 -0.476 -0.630 1.00 0.00 C -ATOM 3 C ASH 1 1.458 -0.515 -0.630 1.00 0.00 C -ATOM 4 O ASH 1 2.088 -1.584 -0.630 1.00 0.00 O -ATOM 5 CB ASH 1 -0.586 0.337 0.582 1.00 0.00 C -ATOM 6 CG ASH 1 -0.124 1.801 0.652 1.00 0.00 C -ATOM 7 OD1 ASH 1 -0.007 2.453 -0.406 1.00 0.00 O -ATOM 8 OD2 ASH 1 0.165 2.283 1.767 1.00 0.00 O -ATOM 9 H ASH 1 0.017 -2.704 -0.630 1.00 0.00 H -ATOM 10 HA ASH 1 -0.366 0.030 -1.563 1.00 0.00 H -ATOM 11 3HB ASH 1 -1.688 0.354 0.586 1.00 0.00 H -ATOM 12 2HB ASH 1 -0.291 -0.154 1.527 1.00 0.00 H -ATOM 13 HD2 ASH 1 0.419 1.577 2.366 1.00 0.00 H +ATOM 1 N ASH 1 0.073 -2.155 -0.780 1.00 1.00 N +ATOM 2 CA ASH 1 -0.268 -0.732 -0.650 1.00 1.00 C +ATOM 3 C ASH 1 0.992 0.072 -0.460 1.00 1.00 C +ATOM 4 O ASH 1 2.002 -0.471 -0.076 1.00 1.00 O +ATOM 5 CB ASH 1 -1.186 -0.536 0.558 1.00 1.00 C +ATOM 6 CG ASH 1 -2.496 -1.240 0.313 1.00 1.00 C +ATOM 7 OD1 ASH 1 -2.677 -1.836 -0.721 1.00 1.00 O +ATOM 8 OD2 ASH 1 -3.462 -1.203 1.244 1.00 1.00 O +ATOM 9 H ASH 1 0.626 -2.320 -1.608 1.00 1.00 H +ATOM 10 HA ASH 1 -0.779 -0.397 -1.553 1.00 1.00 H +ATOM 11 3HB ASH 1 -1.368 0.528 0.707 1.00 1.00 H +ATOM 12 2HB ASH 1 -0.711 -0.952 1.447 1.00 1.00 H +ATOM 13 HD2 ASH 1 -4.284 -1.669 1.043 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/asn.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/asn.pdb index ab3edf2..dfe61a2 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/asn.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/asn.pdb @@ -1,14 +1,14 @@ -ATOM 1 N ASN 1 3.302 1.601 0.000 1.00 0.00 N -ATOM 2 CA ASN 1 3.886 2.939 0.000 1.00 0.00 C -ATOM 3 C ASN 1 5.395 2.870 0.000 1.00 0.00 C -ATOM 4 O ASN 1 5.999 1.798 0.000 1.00 0.00 O -ATOM 5 CB ASN 1 3.371 3.730 1.237 1.00 0.00 C -ATOM 6 CG ASN 1 1.853 3.881 1.381 1.00 0.00 C -ATOM 7 OD1 ASN 1 1.198 3.181 2.139 1.00 0.00 O -ATOM 8 ND2 ASN 1 1.236 4.772 0.652 1.00 0.00 N -ATOM 9 H ASN 1 3.912 0.710 0.000 1.00 0.00 H -ATOM 10 HA ASN 1 3.582 3.454 -0.930 1.00 0.00 H -ATOM 11 2HB ASN 1 3.823 4.739 1.265 1.00 0.00 H -ATOM 12 3HB ASN 1 3.732 3.243 2.164 1.00 0.00 H -ATOM 13 2HD2 ASN 1 1.797 5.276 -0.034 1.00 0.00 H -ATOM 14 1HD2 ASN 1 0.218 4.687 0.711 1.00 0.00 H +ATOM 1 N ASN 1 4.026 1.251 -0.161 1.00 1.00 N +ATOM 2 CA ASN 1 3.657 2.666 -0.025 1.00 1.00 C +ATOM 3 C ASN 1 4.900 3.493 0.186 1.00 1.00 C +ATOM 4 O ASN 1 5.915 2.967 0.576 1.00 1.00 O +ATOM 5 CB ASN 1 2.722 2.836 1.175 1.00 1.00 C +ATOM 6 CG ASN 1 1.429 2.109 0.911 1.00 1.00 C +ATOM 7 OD1 ASN 1 1.270 1.514 -0.135 1.00 1.00 O +ATOM 8 ND2 ASN 1 0.448 2.120 1.835 1.00 1.00 N +ATOM 9 H ASN 1 4.591 1.103 -0.984 1.00 1.00 H +ATOM 10 HA ASN 1 3.149 2.998 -0.930 1.00 1.00 H +ATOM 11 2HB ASN 1 3.196 2.422 2.065 1.00 1.00 H +ATOM 12 3HB ASN 1 2.518 3.895 1.330 1.00 1.00 H +ATOM 13 2HD2 ASN 1 -0.384 1.653 1.666 1.00 1.00 H +ATOM 14 1HD2 ASN 1 0.575 2.596 2.671 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/asp.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/asp.pdb index eceeb54..9d5c5b2 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/asp.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/asp.pdb @@ -1,12 +1,12 @@ -ATOM 1 N ASP 1 -0.610 -1.825 -0.630 1.00 0.00 N -ATOM 2 CA ASP 1 -0.051 -0.476 -0.630 1.00 0.00 C -ATOM 3 C ASP 1 1.458 -0.515 -0.630 1.00 0.00 C -ATOM 4 O ASP 1 2.088 -1.584 -0.630 1.00 0.00 O -ATOM 5 CB ASP 1 -0.586 0.337 0.582 1.00 0.00 C -ATOM 6 CG ASP 1 -0.124 1.801 0.652 1.00 0.00 C -ATOM 7 OD1 ASP 1 -0.007 2.453 -0.406 1.00 0.00 O -ATOM 8 OD2 ASP 1 0.165 2.283 1.767 1.00 0.00 O1- -ATOM 9 H ASP 1 0.017 -2.704 -0.630 1.00 0.00 H -ATOM 10 HA ASP 1 -0.366 0.030 -1.563 1.00 0.00 H -ATOM 11 3HB ASP 1 -1.688 0.354 0.586 1.00 0.00 H -ATOM 12 2HB ASP 1 -0.291 -0.154 1.527 1.00 0.00 H +ATOM 1 N ASP 1 0.073 -2.155 -0.780 1.00 1.00 N +ATOM 2 CA ASP 1 -0.268 -0.732 -0.650 1.00 1.00 C +ATOM 3 C ASP 1 0.992 0.072 -0.460 1.00 1.00 C +ATOM 4 O ASP 1 2.002 -0.471 -0.076 1.00 1.00 O +ATOM 5 CB ASP 1 -1.186 -0.536 0.558 1.00 1.00 C +ATOM 6 CG ASP 1 -2.496 -1.240 0.313 1.00 1.00 C +ATOM 7 OD1 ASP 1 -2.677 -1.836 -0.721 1.00 1.00 O +ATOM 8 OD2 ASP 1 -3.462 -1.203 1.244 1.00 1.00 O +ATOM 9 H ASP 1 0.626 -2.320 -1.608 1.00 1.00 H +ATOM 10 HA ASP 1 -0.779 -0.397 -1.553 1.00 1.00 H +ATOM 11 3HB ASP 1 -1.368 0.528 0.707 1.00 1.00 H +ATOM 12 2HB ASP 1 -0.711 -0.952 1.447 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/cym.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/cym.pdb index e0b7eb7..c953e3b 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/cym.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/cym.pdb @@ -1,10 +1,10 @@ -ATOM 1 N CYM 1 3.288 1.637 0.000 1.00 0.00 N -ATOM 2 CA CYM 1 3.847 2.986 0.000 1.00 0.00 C -ATOM 3 C CYM 1 5.357 2.946 0.000 1.00 0.00 C -ATOM 4 O CYM 1 5.986 1.878 0.000 1.00 0.00 O -ATOM 5 CB CYM 1 3.278 3.752 1.210 1.00 0.00 C -ATOM 6 SG CYM 1 3.789 5.485 1.168 1.00 0.00 S1- -ATOM 7 H CYM 1 3.916 0.758 0.000 1.00 0.00 H -ATOM 8 HA CYM 1 3.532 3.492 -0.931 1.00 0.00 H -ATOM 9 3HB CYM 1 2.174 3.724 1.218 1.00 0.00 H -ATOM 10 2HB CYM 1 3.603 3.297 2.168 1.00 0.00 H +ATOM 1 N CYM 1 3.814 2.856 1.142 1.00 1.00 N +ATOM 2 CA CYM 1 4.123 3.019 -0.285 1.00 1.00 C +ATOM 3 C CYM 1 4.556 1.694 -0.857 1.00 1.00 C +ATOM 4 O CYM 1 5.116 0.887 -0.157 1.00 1.00 O +ATOM 5 CB CYM 1 5.249 4.039 -0.449 1.00 1.00 C +ATOM 6 SG CYM 1 4.728 5.633 0.242 1.00 1.00 S +ATOM 7 H CYM 1 4.659 2.532 1.586 1.00 1.00 H +ATOM 8 HA CYM 1 3.235 3.369 -0.810 1.00 1.00 H +ATOM 9 3HB CYM 1 5.478 4.159 -1.508 1.00 1.00 H +ATOM 10 2HB CYM 1 6.137 3.688 0.077 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/cys.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/cys.pdb index 1374434..6412312 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/cys.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/cys.pdb @@ -1,11 +1,11 @@ -ATOM 1 N CYS 1 3.288 1.637 0.000 1.00 0.00 N -ATOM 2 CA CYS 1 3.847 2.986 0.000 1.00 0.00 C -ATOM 3 C CYS 1 5.357 2.946 0.000 1.00 0.00 C -ATOM 4 O CYS 1 5.986 1.878 0.000 1.00 0.00 O -ATOM 5 CB CYS 1 3.278 3.752 1.210 1.00 0.00 C -ATOM 6 SG CYS 1 3.789 5.485 1.168 1.00 0.00 S -ATOM 7 H CYS 1 3.916 0.758 0.000 1.00 0.00 H -ATOM 8 HA CYS 1 3.532 3.492 -0.931 1.00 0.00 H -ATOM 9 3HB CYS 1 2.174 3.724 1.218 1.00 0.00 H -ATOM 10 2HB CYS 1 3.603 3.297 2.168 1.00 0.00 H -ATOM 11 HG CYS 1 4.701 5.406 2.134 1.00 0.00 H +ATOM 1 N CYS 1 3.814 2.856 1.142 1.00 1.00 N +ATOM 2 CA CYS 1 4.123 3.019 -0.285 1.00 1.00 C +ATOM 3 C CYS 1 4.556 1.694 -0.857 1.00 1.00 C +ATOM 4 O CYS 1 5.116 0.887 -0.157 1.00 1.00 O +ATOM 5 CB CYS 1 5.249 4.039 -0.449 1.00 1.00 C +ATOM 6 SG CYS 1 4.728 5.633 0.242 1.00 1.00 S +ATOM 7 H CYS 1 4.659 2.532 1.586 1.00 1.00 H +ATOM 8 HA CYS 1 3.235 3.369 -0.810 1.00 1.00 H +ATOM 9 3HB CYS 1 5.478 4.159 -1.508 1.00 1.00 H +ATOM 10 2HB CYS 1 6.137 3.688 0.077 1.00 1.00 H +ATOM 11 HG CYS 1 5.830 6.365 0.000 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/glh.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/glh.pdb index fc7a553..d08dda0 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/glh.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/glh.pdb @@ -1,16 +1,16 @@ -ATOM 1 N GLH 1 -0.517 -2.346 -1.038 1.00 0.00 N -ATOM 2 CA GLH 1 0.042 -0.997 -1.038 1.00 0.00 C -ATOM 3 C GLH 1 1.551 -1.037 -1.038 1.00 0.00 C -ATOM 4 O GLH 1 2.180 -2.105 -1.038 1.00 0.00 O -ATOM 5 CB GLH 1 -0.481 -0.212 0.199 1.00 0.00 C -ATOM 6 CG GLH 1 -0.006 1.273 0.310 1.00 0.00 C -ATOM 7 CD GLH 1 -0.430 2.077 1.525 1.00 0.00 C -ATOM 8 OE1 GLH 1 -1.158 1.575 2.403 1.00 0.00 O -ATOM 9 OE2 GLH 1 -0.000 3.247 1.597 1.00 0.00 O -ATOM 10 H GLH 1 0.110 -3.225 -1.038 1.00 0.00 H -ATOM 11 HA GLH 1 -0.284 -0.479 -1.958 1.00 0.00 H -ATOM 12 3HB GLH 1 -1.588 -0.222 0.212 1.00 0.00 H -ATOM 13 2HB GLH 1 -0.192 -0.743 1.129 1.00 0.00 H -ATOM 14 2HG GLH 1 -0.316 1.858 -0.571 1.00 0.00 H -ATOM 15 3HG GLH 1 1.094 1.340 0.339 1.00 0.00 H -ATOM 16 HE2 GLH 1 0.119 3.489 2.518 1.00 0.00 H +ATOM 1 N GLH 1 -0.242 -2.077 -0.145 1.00 1.00 N +ATOM 2 CA GLH 1 -0.071 -1.183 -1.297 1.00 1.00 C +ATOM 3 C GLH 1 1.388 -1.120 -1.672 1.00 1.00 C +ATOM 4 O GLH 1 2.233 -1.439 -0.869 1.00 1.00 O +ATOM 5 CB GLH 1 -0.563 0.219 -0.932 1.00 1.00 C +ATOM 6 CG GLH 1 -2.071 0.177 -0.672 1.00 1.00 C +ATOM 7 CD GLH 1 -2.557 1.558 -0.312 1.00 1.00 C +ATOM 8 OE1 GLH 1 -1.777 2.480 -0.268 1.00 1.00 O +ATOM 9 OE2 GLH 1 -3.855 1.763 -0.040 1.00 1.00 O +ATOM 10 H GLH 1 0.283 -1.747 0.651 1.00 1.00 H +ATOM 11 HA GLH 1 -0.646 -1.562 -2.141 1.00 1.00 H +ATOM 12 3HB GLH 1 -0.355 0.903 -1.754 1.00 1.00 H +ATOM 13 2HB GLH 1 -0.050 0.563 -0.034 1.00 1.00 H +ATOM 14 2HG GLH 1 -2.585 -0.166 -1.570 1.00 1.00 H +ATOM 15 3HG GLH 1 -2.278 -0.507 0.150 1.00 1.00 H +ATOM 16 HE2 GLH 1 -4.119 2.665 0.185 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/gln.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/gln.pdb index 3725b07..522dcad 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/gln.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/gln.pdb @@ -1,17 +1,17 @@ -ATOM 1 N GLN 1 3.266 1.644 0.000 1.00 0.00 N -ATOM 2 CA GLN 1 3.818 2.995 0.000 1.00 0.00 C -ATOM 3 C GLN 1 5.328 2.964 0.000 1.00 0.00 C -ATOM 4 O GLN 1 5.957 1.908 0.000 1.00 0.00 O -ATOM 5 CB GLN 1 3.280 3.750 1.236 1.00 0.00 C -ATOM 6 CG GLN 1 3.729 5.241 1.384 1.00 0.00 C -ATOM 7 CD GLN 1 3.284 6.036 2.618 1.00 0.00 C -ATOM 8 OE1 GLN 1 3.646 7.190 2.789 1.00 0.00 O -ATOM 9 NE2 GLN 1 2.525 5.471 3.522 1.00 0.00 N -ATOM 10 H GLN 1 3.828 0.865 0.000 1.00 0.00 H -ATOM 11 HA GLN 1 3.494 3.511 -0.923 1.00 0.00 H -ATOM 12 3HB GLN 1 2.173 3.715 1.223 1.00 0.00 H -ATOM 13 2HB GLN 1 3.579 3.192 2.148 1.00 0.00 H -ATOM 14 3HG GLN 1 4.832 5.311 1.395 1.00 0.00 H -ATOM 15 2HG GLN 1 3.427 5.819 0.491 1.00 0.00 H -ATOM 16 1HE2 GLN 1 2.328 6.047 4.342 1.00 0.00 H -ATOM 17 2HE2 GLN 1 2.315 4.485 3.354 1.00 0.00 H +ATOM 1 N GLN 1 3.872 2.411 1.205 1.00 1.00 N +ATOM 2 CA GLN 1 4.122 3.103 -0.066 1.00 1.00 C +ATOM 3 C GLN 1 4.418 2.089 -1.139 1.00 1.00 C +ATOM 4 O GLN 1 4.947 1.042 -0.852 1.00 1.00 O +ATOM 5 CB GLN 1 5.316 4.044 0.092 1.00 1.00 C +ATOM 6 CG GLN 1 5.015 5.073 1.182 1.00 1.00 C +ATOM 7 CD GLN 1 6.192 6.001 1.338 1.00 1.00 C +ATOM 8 OE1 GLN 1 7.175 5.852 0.644 1.00 1.00 O +ATOM 9 NE2 GLN 1 6.153 6.994 2.247 1.00 1.00 N +ATOM 10 H GLN 1 4.709 1.893 1.423 1.00 1.00 H +ATOM 11 HA GLN 1 3.240 3.680 -0.344 1.00 1.00 H +ATOM 12 3HB GLN 1 5.501 4.557 -0.852 1.00 1.00 H +ATOM 13 2HB GLN 1 6.198 3.467 0.370 1.00 1.00 H +ATOM 14 3HG GLN 1 4.830 4.560 2.125 1.00 1.00 H +ATOM 15 2HG GLN 1 4.133 5.650 0.903 1.00 1.00 H +ATOM 16 1HE2 GLN 1 6.910 7.591 2.347 1.00 1.00 H +ATOM 17 2HE2 GLN 1 5.366 7.113 2.802 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/glu.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/glu.pdb index 2cd2a72..f2baa7f 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/glu.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/glu.pdb @@ -1,15 +1,15 @@ -ATOM 1 N GLU 1 -0.517 -2.346 -1.038 1.00 0.00 N -ATOM 2 CA GLU 1 0.042 -0.997 -1.038 1.00 0.00 C -ATOM 3 C GLU 1 1.551 -1.037 -1.038 1.00 0.00 C -ATOM 4 O GLU 1 2.180 -2.105 -1.038 1.00 0.00 O -ATOM 5 CB GLU 1 -0.481 -0.212 0.199 1.00 0.00 C -ATOM 6 CG GLU 1 -0.006 1.273 0.310 1.00 0.00 C -ATOM 7 CD GLU 1 -0.430 2.077 1.525 1.00 0.00 C -ATOM 8 OE1 GLU 1 -1.158 1.575 2.403 1.00 0.00 O -ATOM 9 OE2 GLU 1 -0.000 3.247 1.597 1.00 0.00 O1- -ATOM 10 H GLU 1 0.110 -3.225 -1.038 1.00 0.00 H -ATOM 11 HA GLU 1 -0.284 -0.479 -1.958 1.00 0.00 H -ATOM 12 3HB GLU 1 -1.588 -0.222 0.212 1.00 0.00 H -ATOM 13 2HB GLU 1 -0.192 -0.743 1.129 1.00 0.00 H -ATOM 14 2HG GLU 1 -0.316 1.858 -0.571 1.00 0.00 H -ATOM 15 3HG GLU 1 1.094 1.340 0.339 1.00 0.00 H +ATOM 1 N GLU 1 -0.242 -2.077 -0.145 1.00 1.00 N +ATOM 2 CA GLU 1 -0.071 -1.183 -1.297 1.00 1.00 C +ATOM 3 C GLU 1 1.388 -1.120 -1.672 1.00 1.00 C +ATOM 4 O GLU 1 2.233 -1.439 -0.869 1.00 1.00 O +ATOM 5 CB GLU 1 -0.563 0.219 -0.932 1.00 1.00 C +ATOM 6 CG GLU 1 -2.071 0.177 -0.672 1.00 1.00 C +ATOM 7 CD GLU 1 -2.557 1.558 -0.312 1.00 1.00 C +ATOM 8 OE1 GLU 1 -1.777 2.480 -0.268 1.00 1.00 O +ATOM 9 OE2 GLU 1 -3.855 1.763 -0.040 1.00 1.00 O +ATOM 10 H GLU 1 0.283 -1.747 0.651 1.00 1.00 H +ATOM 11 HA GLU 1 -0.646 -1.562 -2.141 1.00 1.00 H +ATOM 12 3HB GLU 1 -0.355 0.903 -1.754 1.00 1.00 H +ATOM 13 2HB GLU 1 -0.050 0.563 -0.034 1.00 1.00 H +ATOM 14 3HG GLU 1 -2.278 -0.507 0.150 1.00 1.00 H +ATOM 15 2HG GLU 1 -2.585 -0.166 -1.570 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/gly.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/gly.pdb index e6638e8..f847ff5 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/gly.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/gly.pdb @@ -1,7 +1,7 @@ -ATOM 1 N GLY 1 58.491 32.332 -1.281 1.00 0.00 N -ATOM 2 CA GLY 1 59.916 32.449 -1.577 1.00 0.00 C -ATOM 3 C GLY 1 60.745 31.741 -0.533 1.00 0.00 C -ATOM 4 O GLY 1 60.231 31.156 0.424 1.00 0.00 O -ATOM 5 H GLY 1 58.128 31.798 -0.415 1.00 0.00 H -ATOM 6 3HA GLY 1 60.168 33.468 -1.589 0.00 0.00 H -ATOM 7 HA GLY 1 60.120 31.972 -2.554 1.00 0.00 H +ATOM 1 N GLY 1 58.714 31.523 -0.802 1.00 1.00 N +ATOM 2 CA GLY 1 59.538 32.434 -1.609 1.00 1.00 C +ATOM 3 C GLY 1 60.901 32.566 -0.981 1.00 1.00 C +ATOM 4 O GLY 1 61.161 31.964 0.034 1.00 1.00 O +ATOM 5 H GLY 1 58.657 31.837 0.154 1.00 1.00 H +ATOM 6 3HA GLY 1 59.060 33.413 -1.651 1.00 1.00 H +ATOM 7 HA GLY 1 59.639 32.034 -2.617 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/hid.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/hid.pdb index 75734e7..e82f8d7 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/hid.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/hid.pdb @@ -1,17 +1,17 @@ -ATOM 1 N HID 1 0.998 2.508 9.552 1.00 0.00 N -ATOM 2 CA HID 1 1.552 3.827 9.845 1.00 0.00 C -ATOM 3 C HID 1 3.061 3.800 9.814 1.00 0.00 C -ATOM 4 O HID 1 3.695 2.763 9.567 1.00 0.00 O -ATOM 5 CB HID 1 1.051 4.204 11.249 1.00 0.00 C -ATOM 6 CG HID 1 0.219 5.453 11.241 1.00 0.00 C -ATOM 7 CD2 HID 1 -1.160 5.435 11.079 1.00 0.00 C -ATOM 8 ND1 HID 1 0.697 6.753 11.390 1.00 0.00 N -ATOM 9 NE2 HID 1 -1.608 6.730 11.117 1.00 0.00 N -ATOM 10 CE1 HID 1 -0.459 7.436 11.299 1.00 0.00 C -ATOM 11 H HID 1 1.629 1.656 9.347 1.00 0.00 H -ATOM 12 HA HID 1 1.232 4.510 9.040 1.00 0.00 H -ATOM 13 2HB HID 1 1.897 4.363 11.947 1.00 0.00 H -ATOM 14 3HB HID 1 0.441 3.397 11.706 1.00 0.00 H -ATOM 15 2HD HID 1 -1.752 4.534 10.947 1.00 0.00 H -ATOM 16 1HD HID 1 1.640 7.087 11.527 1.00 0.00 H -ATOM 17 1HE HID 1 -0.474 8.524 11.369 1.00 0.00 H +ATOM 1 N HID 1 2.806 4.034 9.262 1.00 1.00 N +ATOM 2 CA HID 1 2.159 2.969 9.985 1.00 1.00 C +ATOM 3 C HID 1 0.646 3.131 9.964 1.00 1.00 C +ATOM 4 O HID 1 0.091 4.226 9.982 1.00 1.00 O +ATOM 5 CB HID 1 2.657 2.903 11.434 1.00 1.00 C +ATOM 6 CG HID 1 2.440 1.551 12.071 1.00 1.00 C +ATOM 7 CD2 HID 1 3.237 0.477 12.100 1.00 1.00 C +ATOM 8 ND1 HID 1 1.293 1.287 12.736 1.00 1.00 N +ATOM 9 NE2 HID 1 2.542 -0.472 12.810 1.00 1.00 N +ATOM 10 CE1 HID 1 1.364 0.032 13.191 1.00 1.00 C +ATOM 11 H HID 1 3.024 3.901 8.288 1.00 1.00 H +ATOM 12 HA HID 1 2.388 2.046 9.442 1.00 1.00 H +ATOM 13 2HB HID 1 3.731 3.132 11.480 1.00 1.00 H +ATOM 14 3HB HID 1 2.170 3.680 12.039 1.00 1.00 H +ATOM 15 2HD HID 1 4.206 0.207 11.728 1.00 1.00 H +ATOM 16 1HD HID 1 0.507 1.915 12.875 1.00 1.00 H +ATOM 17 1HE HID 1 0.607 -0.481 13.762 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/hie.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/hie.pdb index 6b4503d..4d58a50 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/hie.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/hie.pdb @@ -1,17 +1,17 @@ -ATOM 1 N HIE 1 0.998 2.508 9.552 1.00 0.00 N -ATOM 2 CA HIE 1 1.552 3.827 9.845 1.00 0.00 C -ATOM 3 C HIE 1 3.061 3.800 9.814 1.00 0.00 C -ATOM 4 O HIE 1 3.695 2.763 9.567 1.00 0.00 O -ATOM 5 CB HIE 1 1.051 4.204 11.249 1.00 0.00 C -ATOM 6 CG HIE 1 0.219 5.453 11.241 1.00 0.00 C -ATOM 7 CD2 HIE 1 -1.160 5.435 11.079 1.00 0.00 C -ATOM 8 ND1 HIE 1 0.697 6.753 11.390 1.00 0.00 N -ATOM 9 NE2 HIE 1 -1.608 6.730 11.117 1.00 0.00 N -ATOM 10 CE1 HIE 1 -0.459 7.436 11.299 1.00 0.00 C -ATOM 11 H HIE 1 1.629 1.656 9.347 1.00 0.00 H -ATOM 12 HA HIE 1 1.232 4.510 9.040 1.00 0.00 H -ATOM 13 2HB HIE 1 1.897 4.363 11.947 1.00 0.00 H -ATOM 14 3HB HIE 1 0.441 3.397 11.706 1.00 0.00 H -ATOM 15 2HD HIE 1 -1.752 4.534 10.947 1.00 0.00 H -ATOM 16 2HE HIE 1 -2.575 7.074 11.027 1.00 0.00 H -ATOM 17 1HE HIE 1 -0.412 8.514 11.379 1.00 0.00 H +ATOM 1 N HIE 1 2.806 4.034 9.262 1.00 1.00 N +ATOM 2 CA HIE 1 2.159 2.969 9.985 1.00 1.00 C +ATOM 3 C HIE 1 0.646 3.131 9.964 1.00 1.00 C +ATOM 4 O HIE 1 0.091 4.226 9.982 1.00 1.00 O +ATOM 5 CB HIE 1 2.657 2.903 11.434 1.00 1.00 C +ATOM 6 CG HIE 1 2.440 1.551 12.071 1.00 1.00 C +ATOM 7 CD2 HIE 1 3.237 0.477 12.100 1.00 1.00 C +ATOM 8 ND1 HIE 1 1.293 1.287 12.736 1.00 1.00 N +ATOM 9 NE2 HIE 1 2.542 -0.472 12.810 1.00 1.00 N +ATOM 10 CE1 HIE 1 1.364 0.032 13.191 1.00 1.00 C +ATOM 11 H HIE 1 3.024 3.901 8.288 1.00 1.00 H +ATOM 12 HA HIE 1 2.388 2.046 9.442 1.00 1.00 H +ATOM 13 2HB HIE 1 3.731 3.132 11.480 1.00 1.00 H +ATOM 14 3HB HIE 1 2.170 3.680 12.039 1.00 1.00 H +ATOM 15 2HD HIE 1 4.206 0.207 11.728 1.00 1.00 H +ATOM 16 2HE HIE 1 2.869 -1.411 13.015 1.00 1.00 H +ATOM 17 1HE HIE 1 0.607 -0.481 13.762 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/hip.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/hip.pdb index 528a9e8..1e110f3 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/hip.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/hip.pdb @@ -1,18 +1,18 @@ -ATOM 1 N HIP 1 0.998 2.508 9.552 1.00 0.00 N -ATOM 2 CA HIP 1 1.552 3.827 9.845 1.00 0.00 C -ATOM 3 C HIP 1 3.061 3.800 9.814 1.00 0.00 C -ATOM 4 O HIP 1 3.695 2.763 9.567 1.00 0.00 O -ATOM 5 CB HIP 1 1.051 4.204 11.249 1.00 0.00 C -ATOM 6 CG HIP 1 0.219 5.453 11.241 1.00 0.00 C -ATOM 7 CD2 HIP 1 -1.160 5.435 11.079 1.00 0.00 C -ATOM 8 ND1 HIP 1 0.697 6.753 11.390 1.00 0.00 N1+ -ATOM 9 NE2 HIP 1 -1.608 6.730 11.117 1.00 0.00 N -ATOM 10 CE1 HIP 1 -0.459 7.436 11.299 1.00 0.00 C -ATOM 11 H HIP 1 1.629 1.656 9.347 1.00 0.00 H -ATOM 12 HA HIP 1 1.232 4.510 9.040 1.00 0.00 H -ATOM 13 2HB HIP 1 1.897 4.363 11.947 1.00 0.00 H -ATOM 14 3HB HIP 1 0.441 3.397 11.706 1.00 0.00 H -ATOM 15 2HD HIP 1 -1.752 4.534 10.947 1.00 0.00 H -ATOM 16 1HD HIP 1 1.640 7.087 11.527 1.00 0.00 H -ATOM 17 2HE HIP 1 -2.575 7.074 11.027 1.00 0.00 H -ATOM 18 1HE HIP 1 -0.412 8.514 11.379 1.00 0.00 H +ATOM 1 N HIP 1 2.806 4.034 9.262 1.00 1.00 N +ATOM 2 CA HIP 1 2.159 2.969 9.985 1.00 1.00 C +ATOM 3 C HIP 1 0.646 3.131 9.964 1.00 1.00 C +ATOM 4 O HIP 1 0.091 4.226 9.982 1.00 1.00 O +ATOM 5 CB HIP 1 2.657 2.903 11.434 1.00 1.00 C +ATOM 6 CG HIP 1 2.440 1.551 12.071 1.00 1.00 C +ATOM 7 CD2 HIP 1 3.237 0.477 12.100 1.00 1.00 C +ATOM 8 ND1 HIP 1 1.293 1.287 12.736 1.00 1.00 N +ATOM 9 NE2 HIP 1 2.542 -0.472 12.810 1.00 1.00 N +ATOM 10 CE1 HIP 1 1.364 0.032 13.191 1.00 1.00 C +ATOM 11 H HIP 1 3.024 3.901 8.288 1.00 1.00 H +ATOM 12 HA HIP 1 2.388 2.046 9.442 1.00 1.00 H +ATOM 13 2HB HIP 1 3.731 3.132 11.480 1.00 1.00 H +ATOM 14 3HB HIP 1 2.170 3.680 12.039 1.00 1.00 H +ATOM 15 2HD HIP 1 4.206 0.207 11.728 1.00 1.00 H +ATOM 16 1HD HIP 1 0.507 1.915 12.875 1.00 1.00 H +ATOM 17 2HE HIP 1 2.869 -1.411 13.015 1.00 1.00 H +ATOM 18 1HE HIP 1 0.607 -0.481 13.762 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/his.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/his.pdb index 1de35be..b1e9fa6 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/his.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/his.pdb @@ -1,17 +1,17 @@ -ATOM 1 N HIS 1 0.998 2.508 9.552 1.00 0.00 N -ATOM 2 CA HIS 1 1.552 3.827 9.845 1.00 0.00 C -ATOM 3 C HIS 1 3.061 3.800 9.814 1.00 0.00 C -ATOM 4 O HIS 1 3.695 2.763 9.567 1.00 0.00 O -ATOM 5 CB HIS 1 1.051 4.204 11.249 1.00 0.00 C -ATOM 6 CG HIS 1 0.219 5.453 11.241 1.00 0.00 C -ATOM 7 CD2 HIS 1 -1.160 5.435 11.079 1.00 0.00 C -ATOM 8 ND1 HIS 1 0.697 6.753 11.390 1.00 0.00 N -ATOM 9 NE2 HIS 1 -1.608 6.730 11.117 1.00 0.00 N -ATOM 10 CE1 HIS 1 -0.459 7.436 11.299 1.00 0.00 C -ATOM 11 H HIS 1 1.629 1.656 9.347 1.00 0.00 H -ATOM 12 HA HIS 1 1.232 4.510 9.040 1.00 0.00 H -ATOM 13 2HB HIS 1 1.897 4.363 11.947 1.00 0.00 H -ATOM 14 3HB HIS 1 0.441 3.397 11.706 1.00 0.00 H -ATOM 15 2HD HIS 1 -1.752 4.534 10.947 1.00 0.00 H -ATOM 16 2HE HIS 1 -2.575 7.074 11.027 1.00 0.00 H -ATOM 17 1HE HIS 1 -0.412 8.514 11.379 1.00 0.00 H +ATOM 1 N HIS 1 2.806 4.034 9.262 1.00 1.00 N +ATOM 2 CA HIS 1 2.159 2.969 9.985 1.00 1.00 C +ATOM 3 C HIS 1 0.646 3.131 9.964 1.00 1.00 C +ATOM 4 O HIS 1 0.091 4.226 9.982 1.00 1.00 O +ATOM 5 CB HIS 1 2.657 2.903 11.434 1.00 1.00 C +ATOM 6 CG HIS 1 2.440 1.551 12.071 1.00 1.00 C +ATOM 7 CD2 HIS 1 3.237 0.477 12.100 1.00 1.00 C +ATOM 8 ND1 HIS 1 1.293 1.287 12.736 1.00 1.00 N +ATOM 9 NE2 HIS 1 2.542 -0.472 12.810 1.00 1.00 N +ATOM 10 CE1 HIS 1 1.364 0.032 13.191 1.00 1.00 C +ATOM 11 H HIS 1 3.024 3.901 8.288 1.00 1.00 H +ATOM 12 HA HIS 1 2.388 2.046 9.442 1.00 1.00 H +ATOM 13 2HB HIS 1 3.731 3.132 11.480 1.00 1.00 H +ATOM 14 3HB HIS 1 2.170 3.680 12.039 1.00 1.00 H +ATOM 15 2HD HIS 1 4.206 0.207 11.728 1.00 1.00 H +ATOM 16 2HE HIS 1 2.869 -1.411 13.015 1.00 1.00 H +ATOM 17 1HE HIS 1 0.607 -0.481 13.762 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/ile.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/ile.pdb index 8dbe810..c77ef27 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/ile.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/ile.pdb @@ -1,19 +1,19 @@ -ATOM 1 N ILE 1 3.219 1.706 0.000 1.00 0.00 N -ATOM 2 CA ILE 1 3.716 3.079 0.000 1.00 0.00 C -ATOM 3 C ILE 1 5.225 3.108 0.000 1.00 0.00 C -ATOM 4 O ILE 1 5.902 2.069 0.000 1.00 0.00 O -ATOM 5 CB ILE 1 3.111 3.911 1.203 1.00 0.00 C -ATOM 6 CG2 ILE 1 3.550 5.408 1.185 1.00 0.00 C -ATOM 7 CG1 ILE 1 1.553 3.863 1.310 1.00 0.00 C -ATOM 8 CD1 ILE 1 0.953 4.383 2.633 1.00 0.00 C -ATOM 9 H ILE 1 3.885 0.856 0.000 1.00 0.00 H -ATOM 10 HA ILE 1 3.393 3.551 -0.946 1.00 0.00 H -ATOM 11 HB ILE 1 3.509 3.457 2.135 1.00 0.00 H -ATOM 12 1HG2 ILE 1 4.645 5.541 1.229 1.00 0.00 H -ATOM 13 3HG2 ILE 1 3.170 5.969 2.058 1.00 0.00 H -ATOM 14 2HG2 ILE 1 3.191 5.936 0.281 1.00 0.00 H -ATOM 15 2HG1 ILE 1 1.207 2.817 1.212 1.00 0.00 H -ATOM 16 3HG1 ILE 1 1.093 4.388 0.450 1.00 0.00 H -ATOM 17 2HD1 ILE 1 1.139 5.461 2.788 1.00 0.00 H -ATOM 18 3HD1 ILE 1 -0.144 4.246 2.655 1.00 0.00 H -ATOM 19 1HD1 ILE 1 1.364 3.846 3.509 1.00 0.00 H +ATOM 1 N ILE 1 3.744 2.672 1.201 1.00 1.00 N +ATOM 2 CA ILE 1 4.440 2.209 -0.007 1.00 1.00 C +ATOM 3 C ILE 1 3.976 3.012 -1.194 1.00 1.00 C +ATOM 4 O ILE 1 2.855 3.460 -1.218 1.00 1.00 O +ATOM 5 CB ILE 1 4.128 0.730 -0.237 1.00 1.00 C +ATOM 6 CG1 ILE 1 4.599 -0.086 0.967 1.00 1.00 C +ATOM 7 CG2 ILE 1 4.853 0.246 -1.495 1.00 1.00 C +ATOM 8 CD1 ILE 1 4.288 -1.565 0.737 1.00 1.00 C +ATOM 9 H ILE 1 2.759 2.536 1.038 1.00 1.00 H +ATOM 10 HA ILE 1 5.515 2.337 0.120 1.00 1.00 H +ATOM 11 HB ILE 1 3.054 0.601 -0.366 1.00 1.00 H +ATOM 12 2HG1 ILE 1 4.083 0.258 1.863 1.00 1.00 H +ATOM 13 3HG1 ILE 1 5.674 0.042 1.095 1.00 1.00 H +ATOM 14 1HG2 ILE 1 5.926 0.375 -1.368 1.00 1.00 H +ATOM 15 3HG2 ILE 1 4.517 0.826 -2.354 1.00 1.00 H +ATOM 16 2HG2 ILE 1 4.630 -0.808 -1.660 1.00 1.00 H +ATOM 17 1HD1 ILE 1 4.623 -2.147 1.594 1.00 1.00 H +ATOM 18 2HD1 ILE 1 3.213 -1.694 0.608 1.00 1.00 H +ATOM 19 3HD1 ILE 1 4.803 -1.910 -0.159 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/leu.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/leu.pdb index b6c3352..598a7a1 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/leu.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/leu.pdb @@ -1,19 +1,19 @@ -ATOM 1 N LEU 1 3.264 1.635 0.000 1.00 0.00 N -ATOM 2 CA LEU 1 3.832 2.980 0.000 1.00 0.00 C -ATOM 3 C LEU 1 5.341 2.929 0.000 1.00 0.00 C -ATOM 4 O LEU 1 5.963 1.856 0.000 1.00 0.00 O -ATOM 5 CB LEU 1 3.304 3.796 1.214 1.00 0.00 C -ATOM 6 CG LEU 1 1.769 3.981 1.358 1.00 0.00 C -ATOM 7 CD1 LEU 1 1.457 4.902 2.546 1.00 0.00 C -ATOM 8 CD2 LEU 1 1.116 4.541 0.083 1.00 0.00 C -ATOM 9 H LEU 1 3.853 0.796 0.000 1.00 0.00 H -ATOM 10 HA LEU 1 3.539 3.483 -0.939 1.00 0.00 H -ATOM 11 2HB LEU 1 3.774 4.799 1.194 1.00 0.00 H -ATOM 12 3HB LEU 1 3.683 3.331 2.146 1.00 0.00 H -ATOM 13 HG LEU 1 1.320 2.988 1.570 1.00 0.00 H -ATOM 14 3HD1 LEU 1 0.368 5.008 2.704 1.00 0.00 H -ATOM 15 2HD1 LEU 1 1.867 5.920 2.406 1.00 0.00 H -ATOM 16 1HD1 LEU 1 1.876 4.509 3.492 1.00 0.00 H -ATOM 17 1HD2 LEU 1 1.569 5.498 -0.234 1.00 0.00 H -ATOM 18 2HD2 LEU 1 1.215 3.834 -0.762 1.00 0.00 H -ATOM 19 3HD2 LEU 1 0.031 4.710 0.214 1.00 0.00 H +ATOM 1 N LEU 1 4.035 2.407 1.231 1.00 1.00 N +ATOM 2 CA LEU 1 4.304 1.985 -0.150 1.00 1.00 C +ATOM 3 C LEU 1 4.098 3.152 -1.080 1.00 1.00 C +ATOM 4 O LEU 1 3.294 4.010 -0.806 1.00 1.00 O +ATOM 5 CB LEU 1 3.350 0.854 -0.531 1.00 1.00 C +ATOM 6 CG LEU 1 3.560 -0.332 0.413 1.00 1.00 C +ATOM 7 CD2 LEU 1 5.003 -0.823 0.304 1.00 1.00 C +ATOM 8 CD1 LEU 1 2.604 -1.464 0.032 1.00 1.00 C +ATOM 9 H LEU 1 3.077 2.722 1.257 1.00 1.00 H +ATOM 10 HA LEU 1 5.333 1.635 -0.228 1.00 1.00 H +ATOM 11 2HB LEU 1 3.549 0.540 -1.556 1.00 1.00 H +ATOM 12 3HB LEU 1 2.320 1.203 -0.453 1.00 1.00 H +ATOM 13 HG LEU 1 3.359 -0.018 1.437 1.00 1.00 H +ATOM 14 1HD2 LEU 1 5.202 -1.136 -0.721 1.00 1.00 H +ATOM 15 2HD2 LEU 1 5.683 -0.016 0.576 1.00 1.00 H +ATOM 16 3HD2 LEU 1 5.152 -1.667 0.977 1.00 1.00 H +ATOM 17 3HD1 LEU 1 2.803 -1.778 -0.992 1.00 1.00 H +ATOM 18 2HD1 LEU 1 1.575 -1.114 0.110 1.00 1.00 H +ATOM 19 1HD1 LEU 1 2.754 -2.308 0.705 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/lyn.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/lyn.pdb index 83429d3..1426dc5 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/lyn.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/lyn.pdb @@ -1,21 +1,21 @@ -ATOM 1 N LYN 1 -0.449 -3.572 -1.666 1.00 0.00 N -ATOM 2 CA LYN 1 0.110 -2.223 -1.666 1.00 0.00 C -ATOM 3 C LYN 1 1.620 -2.263 -1.666 1.00 0.00 C -ATOM 4 O LYN 1 2.249 -3.331 -1.666 1.00 0.00 O -ATOM 5 CB LYN 1 -0.425 -1.442 -0.435 1.00 0.00 C -ATOM 6 CG LYN 1 0.052 0.031 -0.385 1.00 0.00 C -ATOM 7 CD LYN 1 -0.403 0.814 0.850 1.00 0.00 C -ATOM 8 CE LYN 1 0.198 2.225 0.804 1.00 0.00 C -ATOM 9 NZ LYN 1 -0.372 3.036 1.894 1.00 0.00 N -ATOM 10 H LYN 1 0.179 -4.451 -1.666 1.00 0.00 H -ATOM 11 HA LYN 1 -0.209 -1.713 -2.594 1.00 0.00 H -ATOM 12 3HB LYN 1 -1.533 -1.464 -0.432 1.00 0.00 H -ATOM 13 2HB LYN 1 -0.128 -1.966 0.497 1.00 0.00 H -ATOM 14 3HG LYN 1 1.157 0.075 -0.392 1.00 0.00 H -ATOM 15 2HG LYN 1 -0.270 0.557 -1.305 1.00 0.00 H -ATOM 16 3HD LYN 1 -1.509 0.846 0.887 1.00 0.00 H -ATOM 17 2HD LYN 1 -0.075 0.288 1.770 1.00 0.00 H -ATOM 18 2HE LYN 1 -0.007 2.716 -0.170 1.00 0.00 H -ATOM 19 3HE LYN 1 1.304 2.179 0.893 1.00 0.00 H -ATOM 20 1HZ LYN 1 0.201 2.941 2.720 1.00 0.00 H -ATOM 21 2HZ LYN 1 -0.401 4.006 1.613 1.00 0.00 H +ATOM 1 N LYN 1 -0.308 -3.521 -1.117 1.00 1.00 N +ATOM 2 CA LYN 1 0.047 -2.299 -1.851 1.00 1.00 C +ATOM 3 C LYN 1 1.542 -2.238 -2.030 1.00 1.00 C +ATOM 4 O LYN 1 2.264 -2.888 -1.313 1.00 1.00 O +ATOM 5 CB LYN 1 -0.422 -1.075 -1.062 1.00 1.00 C +ATOM 6 CG LYN 1 -1.951 -1.073 -0.988 1.00 1.00 C +ATOM 7 CD LYN 1 -2.421 0.151 -0.198 1.00 1.00 C +ATOM 8 CE LYN 1 -3.949 0.153 -0.124 1.00 1.00 C +ATOM 9 NZ LYN 1 -4.401 1.329 0.633 1.00 1.00 N +ATOM 10 H LYN 1 0.158 -3.468 -0.224 1.00 1.00 H +ATOM 11 HA LYN 1 -0.435 -2.310 -2.828 1.00 1.00 H +ATOM 12 3HB LYN 1 -0.082 -0.168 -1.561 1.00 1.00 H +ATOM 13 2HB LYN 1 -0.010 -1.112 -0.055 1.00 1.00 H +ATOM 14 3HG LYN 1 -2.292 -1.980 -0.488 1.00 1.00 H +ATOM 15 2HG LYN 1 -2.363 -1.036 -1.995 1.00 1.00 H +ATOM 16 3HD LYN 1 -2.080 1.058 -0.698 1.00 1.00 H +ATOM 17 2HD LYN 1 -2.008 0.114 0.810 1.00 1.00 H +ATOM 18 2HE LYN 1 -4.363 0.190 -1.132 1.00 1.00 H +ATOM 19 3HE LYN 1 -4.290 -0.754 0.375 1.00 1.00 H +ATOM 20 1HZ LYN 1 -4.018 1.294 1.566 1.00 1.00 H +ATOM 21 2HZ LYN 1 -4.085 2.168 0.171 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/lys.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/lys.pdb index 65c6516..f685bd0 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/lys.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/lys.pdb @@ -1,22 +1,22 @@ -ATOM 1 N LYS 1 -0.449 -3.572 -1.666 1.00 0.00 N -ATOM 2 CA LYS 1 0.110 -2.223 -1.666 1.00 0.00 C -ATOM 3 C LYS 1 1.620 -2.263 -1.666 1.00 0.00 C -ATOM 4 O LYS 1 2.249 -3.331 -1.666 1.00 0.00 O -ATOM 5 CB LYS 1 -0.425 -1.442 -0.435 1.00 0.00 C -ATOM 6 CG LYS 1 0.052 0.031 -0.385 1.00 0.00 C -ATOM 7 CD LYS 1 -0.403 0.814 0.850 1.00 0.00 C -ATOM 8 CE LYS 1 0.198 2.225 0.804 1.00 0.00 C -ATOM 9 NZ LYS 1 -0.372 3.036 1.894 1.00 0.00 N1+ -ATOM 10 H LYS 1 0.179 -4.451 -1.666 1.00 0.00 H -ATOM 11 HA LYS 1 -0.209 -1.713 -2.594 1.00 0.00 H -ATOM 12 3HB LYS 1 -1.533 -1.464 -0.432 1.00 0.00 H -ATOM 13 2HB LYS 1 -0.128 -1.966 0.497 1.00 0.00 H -ATOM 14 3HG LYS 1 1.157 0.075 -0.392 1.00 0.00 H -ATOM 15 2HG LYS 1 -0.270 0.557 -1.305 1.00 0.00 H -ATOM 16 3HD LYS 1 -1.509 0.846 0.887 1.00 0.00 H -ATOM 17 2HD LYS 1 -0.075 0.288 1.770 1.00 0.00 H -ATOM 18 2HE LYS 1 -0.007 2.716 -0.170 1.00 0.00 H -ATOM 19 3HE LYS 1 1.304 2.179 0.893 1.00 0.00 H -ATOM 20 3HZ LYS 1 -1.247 3.402 1.548 1.00 0.00 H -ATOM 21 2HZ LYS 1 0.261 3.796 2.164 1.00 0.00 H -ATOM 22 1HZ LYS 1 -0.508 2.465 2.737 1.00 0.00 H +ATOM 1 N LYS 1 -0.308 -3.521 -1.117 1.00 1.00 N +ATOM 2 CA LYS 1 0.047 -2.299 -1.851 1.00 1.00 C +ATOM 3 C LYS 1 1.542 -2.238 -2.030 1.00 1.00 C +ATOM 4 O LYS 1 2.264 -2.888 -1.313 1.00 1.00 O +ATOM 5 CB LYS 1 -0.422 -1.075 -1.062 1.00 1.00 C +ATOM 6 CG LYS 1 -1.951 -1.073 -0.988 1.00 1.00 C +ATOM 7 CD LYS 1 -2.421 0.151 -0.198 1.00 1.00 C +ATOM 8 CE LYS 1 -3.949 0.153 -0.124 1.00 1.00 C +ATOM 9 NZ LYS 1 -4.401 1.329 0.633 1.00 1.00 N +ATOM 10 H LYS 1 0.158 -3.468 -0.224 1.00 1.00 H +ATOM 11 HA LYS 1 -0.435 -2.310 -2.828 1.00 1.00 H +ATOM 12 2HB LYS 1 -0.010 -1.112 -0.055 1.00 1.00 H +ATOM 13 3HB LYS 1 -0.082 -0.168 -1.561 1.00 1.00 H +ATOM 14 2HG LYS 1 -2.363 -1.036 -1.995 1.00 1.00 H +ATOM 15 3HG LYS 1 -2.292 -1.980 -0.488 1.00 1.00 H +ATOM 16 3HD LYS 1 -2.080 1.058 -0.698 1.00 1.00 H +ATOM 17 2HD LYS 1 -2.008 0.114 0.810 1.00 1.00 H +ATOM 18 2HE LYS 1 -4.363 0.190 -1.132 1.00 1.00 H +ATOM 19 3HE LYS 1 -4.290 -0.754 0.375 1.00 1.00 H +ATOM 20 3HZ LYS 1 -5.409 1.331 0.683 1.00 1.00 H +ATOM 21 2HZ LYS 1 -4.085 2.168 0.171 1.00 1.00 H +ATOM 22 1HZ LYS 1 -4.018 1.294 1.566 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/met.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/met.pdb index d03c784..bf6667e 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/met.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/met.pdb @@ -1,17 +1,17 @@ -ATOM 1 N MET 1 3.160 1.730 0.000 1.00 0.00 N -ATOM 2 CA MET 1 3.648 3.106 0.000 1.00 0.00 C -ATOM 3 C MET 1 5.157 3.146 0.000 1.00 0.00 C -ATOM 4 O MET 1 5.841 2.111 0.000 1.00 0.00 O -ATOM 5 CB MET 1 3.073 3.869 1.225 1.00 0.00 C -ATOM 6 CG MET 1 1.537 4.019 1.266 1.00 0.00 C -ATOM 7 SD MET 1 1.070 5.163 2.575 1.00 0.00 S -ATOM 8 CE MET 1 -0.693 4.814 2.617 1.00 0.00 C -ATOM 9 H MET 1 3.833 0.885 0.000 1.00 0.00 H -ATOM 10 HA MET 1 3.310 3.600 -0.930 1.00 0.00 H -ATOM 11 2HB MET 1 3.511 4.885 1.262 1.00 0.00 H -ATOM 12 3HB MET 1 3.408 3.382 2.163 1.00 0.00 H -ATOM 13 2HG MET 1 1.065 3.036 1.453 1.00 0.00 H -ATOM 14 3HG MET 1 1.138 4.385 0.302 1.00 0.00 H -ATOM 15 2HE MET 1 -0.871 3.770 2.930 1.00 0.00 H -ATOM 16 3HE MET 1 -1.202 5.480 3.335 1.00 0.00 H -ATOM 17 1HE MET 1 -1.150 4.962 1.622 1.00 0.00 H +ATOM 1 N MET 1 3.586 2.617 1.172 1.00 1.00 N +ATOM 2 CA MET 1 4.445 2.315 0.020 1.00 1.00 C +ATOM 3 C MET 1 3.934 3.049 -1.192 1.00 1.00 C +ATOM 4 O MET 1 2.755 3.288 -1.301 1.00 1.00 O +ATOM 5 CB MET 1 4.426 0.810 -0.249 1.00 1.00 C +ATOM 6 CG MET 1 4.945 0.065 0.981 1.00 1.00 C +ATOM 7 SD MET 1 4.922 -1.720 0.662 1.00 1.00 S +ATOM 8 CE MET 1 5.568 -2.332 2.242 1.00 1.00 C +ATOM 9 H MET 1 2.657 2.308 0.931 1.00 1.00 H +ATOM 10 HA MET 1 5.465 2.633 0.233 1.00 1.00 H +ATOM 11 2HB MET 1 5.062 0.586 -1.105 1.00 1.00 H +ATOM 12 3HB MET 1 3.405 0.492 -0.463 1.00 1.00 H +ATOM 13 3HG MET 1 5.965 0.382 1.195 1.00 1.00 H +ATOM 14 2HG MET 1 4.307 0.289 1.837 1.00 1.00 H +ATOM 15 3HE MET 1 4.908 -2.019 3.050 1.00 1.00 H +ATOM 16 2HE MET 1 6.565 -1.925 2.408 1.00 1.00 H +ATOM 17 1HE MET 1 5.620 -3.420 2.218 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/phe.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/phe.pdb index ce1bc24..8a0ca84 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/phe.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/phe.pdb @@ -1,20 +1,20 @@ -ATOM 1 N PHE 1 3.237 1.682 0.000 1.00 0.00 N -ATOM 2 CA PHE 1 3.752 3.048 0.000 1.00 0.00 C -ATOM 3 C PHE 1 5.262 3.058 0.000 1.00 0.00 C -ATOM 4 O PHE 1 5.937 1.991 0.000 1.00 0.00 O -ATOM 5 CB PHE 1 3.244 3.811 1.261 1.00 0.00 C -ATOM 6 CG PHE 1 1.720 3.906 1.436 1.00 0.00 C -ATOM 7 CD2 PHE 1 0.999 4.960 0.870 1.00 0.00 C -ATOM 8 CD1 PHE 1 1.038 2.891 2.117 1.00 0.00 C -ATOM 9 CE2 PHE 1 -0.389 4.995 0.977 1.00 0.00 C -ATOM 10 CE1 PHE 1 -0.349 2.921 2.214 1.00 0.00 C -ATOM 11 CZ PHE 1 -1.062 3.974 1.646 1.00 0.00 C -ATOM 12 H PHE 1 3.892 0.824 0.000 1.00 0.00 H -ATOM 13 HA PHE 1 3.406 3.562 -0.917 1.00 0.00 H -ATOM 14 2HB PHE 1 3.660 4.838 1.262 1.00 0.00 H -ATOM 15 3HB PHE 1 3.681 3.355 2.173 1.00 0.00 H -ATOM 16 2HD PHE 1 1.513 5.744 0.331 1.00 0.00 H -ATOM 17 1HD PHE 1 1.583 2.054 2.533 1.00 0.00 H -ATOM 18 2HE PHE 1 -0.943 5.808 0.531 1.00 0.00 H -ATOM 19 1HE PHE 1 -0.868 2.117 2.715 1.00 0.00 H -ATOM 20 HZ PHE 1 -2.139 3.992 1.718 1.00 0.00 H +ATOM 1 N PHE 1 3.348 2.841 0.968 1.00 1.00 N +ATOM 2 CA PHE 1 4.035 3.076 -0.308 1.00 1.00 C +ATOM 3 C PHE 1 4.868 1.870 -0.660 1.00 1.00 C +ATOM 4 O PHE 1 5.336 1.184 0.216 1.00 1.00 O +ATOM 5 CB PHE 1 4.939 4.303 -0.182 1.00 1.00 C +ATOM 6 CG PHE 1 4.107 5.507 0.169 1.00 1.00 C +ATOM 7 CD1 PHE 1 3.878 5.827 1.494 1.00 1.00 C +ATOM 8 CD2 PHE 1 3.575 6.297 -0.834 1.00 1.00 C +ATOM 9 CE1 PHE 1 3.114 6.933 1.816 1.00 1.00 C +ATOM 10 CE2 PHE 1 2.809 7.400 -0.510 1.00 1.00 C +ATOM 11 CZ PHE 1 2.580 7.719 0.815 1.00 1.00 C +ATOM 12 H PHE 1 4.066 2.688 1.659 1.00 1.00 H +ATOM 13 HA PHE 1 3.297 3.248 -1.091 1.00 1.00 H +ATOM 14 2HB PHE 1 5.678 4.130 0.601 1.00 1.00 H +ATOM 15 3HB PHE 1 5.450 4.477 -1.129 1.00 1.00 H +ATOM 16 1HD PHE 1 4.297 5.213 2.277 1.00 1.00 H +ATOM 17 2HD PHE 1 3.755 6.048 -1.869 1.00 1.00 H +ATOM 18 1HE PHE 1 2.935 7.182 2.852 1.00 1.00 H +ATOM 19 2HE PHE 1 2.390 8.014 -1.295 1.00 1.00 H +ATOM 20 HZ PHE 1 1.982 8.583 1.066 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/pro.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/pro.pdb index b7e93a9..a5b24c1 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/pro.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/pro.pdb @@ -1,14 +1,14 @@ -ATOM 1 N PRO 1 1.490 2.041 -2.086 1.00 0.00 N -ATOM 2 CA PRO 1 2.000 3.044 -3.009 1.00 0.00 C -ATOM 3 C PRO 1 1.905 4.460 -2.416 1.00 0.00 C -ATOM 4 O PRO 1 1.448 4.634 -1.286 1.00 0.00 O -ATOM 5 CB PRO 1 1.090 2.842 -4.230 1.00 0.00 C -ATOM 6 CG PRO 1 -0.227 2.338 -3.621 1.00 0.00 C -ATOM 7 CD PRO 1 0.237 1.433 -2.477 1.00 0.00 C -ATOM 8 HA PRO 1 3.043 2.838 -3.261 1.00 0.00 H -ATOM 9 2HB PRO 1 1.515 2.061 -4.864 1.00 0.00 H -ATOM 10 3HB PRO 1 0.963 3.752 -4.821 1.00 0.00 H -ATOM 11 3HG PRO 1 -0.788 3.181 -3.213 1.00 0.00 H -ATOM 12 2HG PRO 1 -0.846 1.803 -4.345 1.00 0.00 H -ATOM 13 3HD PRO 1 -0.472 1.422 -1.646 1.00 0.00 H -ATOM 14 2HD PRO 1 0.420 0.416 -2.832 1.00 0.00 H +ATOM 1 N PRO 1 2.202 3.014 -3.683 1.00 1.00 N +ATOM 2 CA PRO 1 1.382 3.565 -2.572 1.00 1.00 C +ATOM 3 C PRO 1 1.811 2.966 -1.256 1.00 1.00 C +ATOM 4 O PRO 1 2.475 1.957 -1.240 1.00 1.00 O +ATOM 5 CB PRO 1 -0.065 3.146 -2.908 1.00 1.00 C +ATOM 6 CG PRO 1 -0.075 2.928 -4.435 1.00 1.00 C +ATOM 7 CD PRO 1 1.367 3.233 -4.893 1.00 1.00 C +ATOM 8 HA PRO 1 1.466 4.651 -2.540 1.00 1.00 H +ATOM 9 2HB PRO 1 -0.321 2.220 -2.393 1.00 1.00 H +ATOM 10 3HB PRO 1 -0.762 3.938 -2.634 1.00 1.00 H +ATOM 11 2HG PRO 1 -0.335 1.896 -4.669 1.00 1.00 H +ATOM 12 3HG PRO 1 -0.776 3.614 -4.912 1.00 1.00 H +ATOM 13 3HD PRO 1 1.450 4.268 -5.226 1.00 1.00 H +ATOM 14 2HD PRO 1 1.666 2.552 -5.690 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/ser.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/ser.pdb index cfb26c9..b93527f 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/ser.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/ser.pdb @@ -1,11 +1,11 @@ -ATOM 1 N SER 1 3.321 1.549 0.000 1.00 0.00 N -ATOM 2 CA SER 1 3.951 2.866 0.000 1.00 0.00 C -ATOM 3 C SER 1 5.457 2.745 0.000 1.00 0.00 C -ATOM 4 O SER 1 6.023 1.652 0.000 1.00 0.00 O -ATOM 5 CB SER 1 3.448 3.718 1.192 1.00 0.00 C -ATOM 6 OG SER 1 3.913 3.235 2.457 1.00 0.00 O -ATOM 7 H SER 1 3.899 0.637 0.000 1.00 0.00 H -ATOM 8 HA SER 1 3.671 3.378 -0.939 1.00 0.00 H -ATOM 9 2HB SER 1 2.343 3.778 1.203 1.00 0.00 H -ATOM 10 3HB SER 1 3.789 4.765 1.072 1.00 0.00 H -ATOM 11 HG SER 1 3.549 2.355 2.580 1.00 0.00 H +ATOM 1 N SER 1 3.925 2.783 1.132 1.00 1.00 N +ATOM 2 CA SER 1 4.204 2.868 -0.308 1.00 1.00 C +ATOM 3 C SER 1 4.600 1.509 -0.824 1.00 1.00 C +ATOM 4 O SER 1 5.160 0.726 -0.096 1.00 1.00 O +ATOM 5 CB SER 1 5.346 3.857 -0.548 1.00 1.00 C +ATOM 6 OG SER 1 4.971 5.145 -0.058 1.00 1.00 O +ATOM 7 H SER 1 4.773 2.464 1.573 1.00 1.00 H +ATOM 8 HA SER 1 3.311 3.210 -0.831 1.00 1.00 H +ATOM 9 2HB SER 1 6.238 3.514 -0.024 1.00 1.00 H +ATOM 10 3HB SER 1 5.553 3.920 -1.616 1.00 1.00 H +ATOM 11 HG SER 1 5.717 5.737 -0.229 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/thr.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/thr.pdb index 29eb37e..8a1da81 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/thr.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/thr.pdb @@ -1,14 +1,14 @@ -ATOM 1 N THR 1 3.343 1.554 0.000 1.00 0.00 N -ATOM 2 CA THR 1 3.961 2.876 0.000 1.00 0.00 C -ATOM 3 C THR 1 5.467 2.770 0.000 1.00 0.00 C -ATOM 4 O THR 1 6.036 1.697 0.000 1.00 0.00 O -ATOM 5 CB THR 1 3.465 3.715 1.226 1.00 0.00 C -ATOM 6 OG1 THR 1 2.058 3.909 1.162 1.00 0.00 O -ATOM 7 CG2 THR 1 4.046 5.139 1.361 1.00 0.00 C -ATOM 8 H THR 1 3.930 0.647 0.000 1.00 0.00 H -ATOM 9 HA THR 1 3.667 3.398 -0.929 1.00 0.00 H -ATOM 10 HB THR 1 3.703 3.151 2.154 1.00 0.00 H -ATOM 11 1HG THR 1 1.814 4.364 1.973 1.00 0.00 H -ATOM 12 1HG2 THR 1 3.633 5.676 2.235 1.00 0.00 H -ATOM 13 2HG2 THR 1 5.143 5.137 1.502 1.00 0.00 H -ATOM 14 3HG2 THR 1 3.834 5.755 0.467 1.00 0.00 H +ATOM 1 N THR 1 4.184 3.466 -0.629 1.00 1.00 N +ATOM 2 CA THR 1 4.501 2.569 0.490 1.00 1.00 C +ATOM 3 C THR 1 4.085 1.165 0.139 1.00 1.00 C +ATOM 4 O THR 1 3.151 0.977 -0.602 1.00 1.00 O +ATOM 5 CB THR 1 3.748 3.029 1.739 1.00 1.00 C +ATOM 6 OG1 THR 1 2.343 2.997 1.486 1.00 1.00 O +ATOM 7 CG2 THR 1 4.169 4.456 2.094 1.00 1.00 C +ATOM 8 H THR 1 3.188 3.412 -0.771 1.00 1.00 H +ATOM 9 HA THR 1 5.574 2.594 0.682 1.00 1.00 H +ATOM 10 HB THR 1 3.983 2.363 2.569 1.00 1.00 H +ATOM 11 1HG THR 1 2.178 3.597 0.747 1.00 1.00 H +ATOM 12 1HG2 THR 1 3.633 4.782 2.984 1.00 1.00 H +ATOM 13 3HG2 THR 1 3.934 5.121 1.264 1.00 1.00 H +ATOM 14 2HG2 THR 1 5.242 4.481 2.287 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/trp.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/trp.pdb index 856455a..f9d85bf 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/trp.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/trp.pdb @@ -1,24 +1,24 @@ -ATOM 1 N TRP 1 3.574 9.880 0.152 1.00 0.00 N -ATOM 2 CA TRP 1 4.136 11.227 0.123 1.00 0.00 C -ATOM 3 C TRP 1 5.646 11.184 0.124 1.00 0.00 C -ATOM 4 O TRP 1 6.267 10.123 0.147 1.00 0.00 O -ATOM 5 CB TRP 1 3.632 12.015 1.364 1.00 0.00 C -ATOM 6 CG TRP 1 2.126 12.294 1.378 1.00 0.00 C -ATOM 7 CD1 TRP 1 1.429 13.260 0.682 1.00 0.00 C -ATOM 8 CD2 TRP 1 1.154 11.528 2.054 1.00 0.00 C -ATOM 9 CE2 TRP 1 0.049 13.074 0.945 1.00 0.00 C -ATOM 10 CE3 TRP 1 1.865 14.288 -0.193 1.00 0.00 C -ATOM 11 NE1 TRP 1 -0.148 12.000 1.800 1.00 0.00 N -ATOM 12 CZ2 TRP 1 -0.905 13.923 0.343 1.00 0.00 C -ATOM 13 CZ3 TRP 1 0.904 15.118 -0.770 1.00 0.00 C -ATOM 14 CH2 TRP 1 -0.461 14.941 -0.505 1.00 0.00 C -ATOM 15 H TRP 1 4.153 9.065 0.170 1.00 0.00 H -ATOM 16 HA TRP 1 3.817 11.733 -0.808 1.00 0.00 H -ATOM 17 2HB TRP 1 4.152 12.989 1.436 1.00 0.00 H -ATOM 18 3HB TRP 1 3.916 11.484 2.294 1.00 0.00 H -ATOM 19 1HD TRP 1 1.383 10.656 2.653 1.00 0.00 H -ATOM 20 3HE TRP 1 2.915 14.427 -0.409 1.00 0.00 H -ATOM 21 1HE TRP 1 -1.040 11.612 2.127 1.00 0.00 H -ATOM 22 2HZ TRP 1 -1.958 13.785 0.539 1.00 0.00 H -ATOM 23 3HZ TRP 1 1.220 15.911 -1.433 1.00 0.00 H -ATOM 24 2HH TRP 1 -1.181 15.602 -0.963 1.00 0.00 H +ATOM 1 N TRP 1 3.429 10.609 0.817 1.00 1.00 N +ATOM 2 CA TRP 1 4.397 11.308 -0.038 1.00 1.00 C +ATOM 3 C TRP 1 5.530 10.374 -0.380 1.00 1.00 C +ATOM 4 O TRP 1 5.851 9.505 0.395 1.00 1.00 O +ATOM 5 CB TRP 1 4.946 12.527 0.703 1.00 1.00 C +ATOM 6 CG TRP 1 3.813 13.459 1.044 1.00 1.00 C +ATOM 7 CD1 TRP 1 3.076 13.443 2.166 1.00 1.00 C +ATOM 8 CD2 TRP 1 3.312 14.559 0.219 1.00 1.00 C +ATOM 9 NE1 TRP 1 2.139 14.440 2.124 1.00 1.00 N +ATOM 10 CE3 TRP 1 3.655 15.066 -1.036 1.00 1.00 C +ATOM 11 CE2 TRP 1 2.255 15.140 0.944 1.00 1.00 C +ATOM 12 CZ3 TRP 1 2.970 16.131 -1.548 1.00 1.00 C +ATOM 13 CZ2 TRP 1 1.571 16.223 0.402 1.00 1.00 C +ATOM 14 CH2 TRP 1 1.931 16.710 -0.835 1.00 1.00 C +ATOM 15 H TRP 1 3.926 10.329 1.649 1.00 1.00 H +ATOM 16 HA TRP 1 3.905 11.632 -0.955 1.00 1.00 H +ATOM 17 2HB TRP 1 5.438 12.203 1.620 1.00 1.00 H +ATOM 18 3HB TRP 1 5.665 13.045 0.069 1.00 1.00 H +ATOM 19 1HD TRP 1 3.202 12.747 2.982 1.00 1.00 H +ATOM 20 1HE TRP 1 1.492 14.626 2.820 1.00 1.00 H +ATOM 21 3HE TRP 1 4.463 14.620 -1.597 1.00 1.00 H +ATOM 22 3HZ TRP 1 3.240 16.525 -2.517 1.00 1.00 H +ATOM 23 2HZ TRP 1 0.759 16.680 0.949 1.00 1.00 H +ATOM 24 2HH TRP 1 1.397 17.551 -1.254 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/tym.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/tym.pdb new file mode 100644 index 00000000..f566b4b --- /dev/null +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/tym.pdb @@ -0,0 +1,20 @@ +ATOM 1 N TYM 1 58.590 31.804 -1.493 1.00 1.00 N +ATOM 2 CA TYM 1 59.830 32.591 -1.506 1.00 1.00 C +ATOM 3 C TYM 1 60.732 32.127 -0.392 1.00 1.00 C +ATOM 4 O TYM 1 60.256 31.676 0.622 1.00 1.00 O +ATOM 5 CB TYM 1 59.497 34.070 -1.311 1.00 1.00 C +ATOM 6 CG TYM 1 58.596 34.534 -2.425 1.00 1.00 C +ATOM 7 CD1 TYM 1 57.224 34.445 -2.285 1.00 1.00 C +ATOM 8 CD2 TYM 1 59.143 35.055 -3.583 1.00 1.00 C +ATOM 9 CE1 TYM 1 56.395 34.870 -3.305 1.00 1.00 C +ATOM 10 CE2 TYM 1 58.318 35.476 -4.608 1.00 1.00 C +ATOM 11 CZ TYM 1 56.940 35.388 -4.470 1.00 1.00 C +ATOM 12 OH TYM 1 56.128 35.807 -5.475 1.00 1.00 O +ATOM 13 H TYM 1 58.159 31.959 -0.594 1.00 1.00 H +ATOM 14 HA TYM 1 60.336 32.456 -2.463 1.00 1.00 H +ATOM 15 2HB TYM 1 58.993 34.206 -0.354 1.00 1.00 H +ATOM 16 3HB TYM 1 60.418 34.655 -1.321 1.00 1.00 H +ATOM 17 1HD TYM 1 56.800 34.044 -1.377 1.00 1.00 H +ATOM 18 2HD TYM 1 60.215 35.124 -3.690 1.00 1.00 H +ATOM 19 1HE TYM 1 55.323 34.800 -3.196 1.00 1.00 H +ATOM 20 2HE TYM 1 58.745 35.878 -5.515 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/tyr.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/tyr.pdb index 835a0ed..fa060b4 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/tyr.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/tyr.pdb @@ -1,21 +1,21 @@ -ATOM 1 N TYR 1 58.491 32.332 -1.281 1.00 0.00 N -ATOM 2 CA TYR 1 59.916 32.449 -1.577 1.00 0.00 C -ATOM 3 C TYR 1 60.745 31.741 -0.533 1.00 0.00 C -ATOM 4 O TYR 1 60.231 31.156 0.424 1.00 0.00 O -ATOM 5 CB TYR 1 60.356 33.942 -1.608 1.00 0.00 C -ATOM 6 CG TYR 1 59.694 34.833 -2.666 1.00 0.00 C -ATOM 7 CD1 TYR 1 60.111 34.785 -4.000 1.00 0.00 C -ATOM 8 CD2 TYR 1 58.657 35.695 -2.298 1.00 0.00 C -ATOM 9 CE1 TYR 1 59.492 35.588 -4.954 1.00 0.00 C -ATOM 10 CE2 TYR 1 58.040 36.497 -3.253 1.00 0.00 C -ATOM 11 CZ TYR 1 58.458 36.443 -4.581 1.00 0.00 C -ATOM 12 OH TYR 1 57.852 37.227 -5.521 1.00 0.00 O -ATOM 13 H TYR 1 58.128 31.798 -0.415 1.00 0.00 H -ATOM 14 HA TYR 1 60.120 31.972 -2.554 1.00 0.00 H -ATOM 15 2HB TYR 1 61.452 34.004 -1.759 1.00 0.00 H -ATOM 16 3HB TYR 1 60.209 34.389 -0.603 1.00 0.00 H -ATOM 17 1HD TYR 1 60.909 34.120 -4.300 1.00 0.00 H -ATOM 18 2HD TYR 1 58.320 35.734 -1.271 1.00 0.00 H -ATOM 19 1HE TYR 1 59.808 35.548 -5.986 1.00 0.00 H -ATOM 20 2HE TYR 1 57.236 37.154 -2.957 1.00 0.00 H -ATOM 21 HH TYR 1 57.168 37.744 -5.090 1.00 0.00 H +ATOM 1 N TYR 1 58.590 31.804 -1.493 1.00 1.00 N +ATOM 2 CA TYR 1 59.830 32.591 -1.506 1.00 1.00 C +ATOM 3 C TYR 1 60.732 32.127 -0.392 1.00 1.00 C +ATOM 4 O TYR 1 60.256 31.676 0.622 1.00 1.00 O +ATOM 5 CB TYR 1 59.497 34.070 -1.311 1.00 1.00 C +ATOM 6 CG TYR 1 58.596 34.534 -2.425 1.00 1.00 C +ATOM 7 CD1 TYR 1 57.224 34.445 -2.285 1.00 1.00 C +ATOM 8 CD2 TYR 1 59.143 35.055 -3.583 1.00 1.00 C +ATOM 9 CE1 TYR 1 56.395 34.870 -3.305 1.00 1.00 C +ATOM 10 CE2 TYR 1 58.318 35.476 -4.608 1.00 1.00 C +ATOM 11 CZ TYR 1 56.940 35.388 -4.470 1.00 1.00 C +ATOM 12 OH TYR 1 56.128 35.807 -5.475 1.00 1.00 O +ATOM 13 H TYR 1 58.159 31.959 -0.594 1.00 1.00 H +ATOM 14 HA TYR 1 60.336 32.456 -2.463 1.00 1.00 H +ATOM 15 2HB TYR 1 58.993 34.206 -0.354 1.00 1.00 H +ATOM 16 3HB TYR 1 60.418 34.655 -1.321 1.00 1.00 H +ATOM 17 1HD TYR 1 56.800 34.044 -1.377 1.00 1.00 H +ATOM 18 2HD TYR 1 60.215 35.124 -3.690 1.00 1.00 H +ATOM 19 1HE TYR 1 55.323 34.800 -3.196 1.00 1.00 H +ATOM 20 2HE TYR 1 58.745 35.878 -5.515 1.00 1.00 H +ATOM 21 HH TYR 1 55.942 36.741 -5.315 1.00 1.00 H diff --git a/src/chilife/data/rotamer_libraries/residue_pdbs/val.pdb b/src/chilife/data/rotamer_libraries/residue_pdbs/val.pdb index 28fc508..4d9f490 100644 --- a/src/chilife/data/rotamer_libraries/residue_pdbs/val.pdb +++ b/src/chilife/data/rotamer_libraries/residue_pdbs/val.pdb @@ -1,16 +1,16 @@ -ATOM 1 N VAL 1 3.230 1.688 0.000 1.00 0.00 N -ATOM 2 CA VAL 1 3.751 3.052 0.000 1.00 0.00 C -ATOM 3 C VAL 1 5.261 3.054 0.000 1.00 0.00 C -ATOM 4 O VAL 1 5.919 2.006 0.000 1.00 0.00 O -ATOM 5 CB VAL 1 3.188 3.841 1.248 1.00 0.00 C -ATOM 6 CG2 VAL 1 1.655 4.051 1.217 1.00 0.00 C -ATOM 7 CG1 VAL 1 3.789 5.251 1.501 1.00 0.00 C -ATOM 8 H VAL 1 3.882 0.826 0.000 1.00 0.00 H -ATOM 9 HA VAL 1 3.427 3.557 -0.928 1.00 0.00 H -ATOM 10 HB VAL 1 3.417 3.234 2.150 1.00 0.00 H -ATOM 11 1HG2 VAL 1 1.111 3.095 1.107 1.00 0.00 H -ATOM 12 3HG2 VAL 1 1.337 4.706 0.384 1.00 0.00 H -ATOM 13 2HG2 VAL 1 1.283 4.507 2.155 1.00 0.00 H -ATOM 14 1HG1 VAL 1 3.634 5.937 0.647 1.00 0.00 H -ATOM 15 2HG1 VAL 1 3.356 5.738 2.396 1.00 0.00 H -ATOM 16 3HG1 VAL 1 4.878 5.217 1.696 1.00 0.00 H +ATOM 1 N VAL 1 4.004 3.664 -0.629 1.00 1.00 N +ATOM 2 CA VAL 1 4.304 2.771 0.498 1.00 1.00 C +ATOM 3 C VAL 1 3.934 1.358 0.131 1.00 1.00 C +ATOM 4 O VAL 1 3.030 1.152 -0.642 1.00 1.00 O +ATOM 5 CB VAL 1 3.498 3.209 1.721 1.00 1.00 C +ATOM 6 CG1 VAL 1 3.873 4.644 2.094 1.00 1.00 C +ATOM 7 CG2 VAL 1 2.004 3.139 1.400 1.00 1.00 C +ATOM 8 H VAL 1 3.014 3.586 -0.805 1.00 1.00 H +ATOM 9 HA VAL 1 5.368 2.821 0.728 1.00 1.00 H +ATOM 10 HB VAL 1 3.720 2.546 2.559 1.00 1.00 H +ATOM 11 2HG1 VAL 1 4.937 4.693 2.323 1.00 1.00 H +ATOM 12 3HG1 VAL 1 3.650 5.306 1.258 1.00 1.00 H +ATOM 13 1HG1 VAL 1 3.298 4.956 2.967 1.00 1.00 H +ATOM 14 2HG2 VAL 1 1.737 2.117 1.135 1.00 1.00 H +ATOM 15 1HG2 VAL 1 1.782 3.801 0.563 1.00 1.00 H +ATOM 16 3HG2 VAL 1 1.429 3.450 2.272 1.00 1.00 H diff --git a/src/chilife/globals.py b/src/chilife/globals.py index 0fde71a..4ffd331 100644 --- a/src/chilife/globals.py +++ b/src/chilife/globals.py @@ -102,6 +102,7 @@ def bond_hmax(a): "HIE": "HIS", "HIP": "HIS", "CYM": "CYS", + "TYM": "TYR", } ralt_prot_states = { "ASP": {13: "ASH", 12: "ASP"}, @@ -109,6 +110,7 @@ def bond_hmax(a): "LYS": {21: "LYN", 22: "LYS"}, "HIS": {17: "HIS", 18: "HIP"}, "CYS": {10: "CYM", 11: "CYS"}, + "TYR": {20: "TYM", 21: "TYR"}, } @@ -125,6 +127,7 @@ def bond_hmax(a): "CYM": "C", "ASH": "D", "GLH": "E", + "TYM": "Y", } ) del inataa diff --git a/src/chilife/protein_utils.py b/src/chilife/protein_utils.py index 4dc24fd..e9e3aa5 100644 --- a/src/chilife/protein_utils.py +++ b/src/chilife/protein_utils.py @@ -24,7 +24,7 @@ from MDAnalysis.core.topologyattrs import Atomindices, Resindices, Segindices, Segids import MDAnalysis as mda -from .globals import SUPPORTED_RESIDUES +from .globals import SUPPORTED_RESIDUES, alt_prot_states, ralt_prot_states from .MolSys import MolecularSystemBase, MolSys, concat_molsys from .numba_utils import get_sasa, _ic_to_cart from .pdb_utils import get_backbone_atoms, get_bb_candidates @@ -488,14 +488,253 @@ def save_pdb(name: Union[str, Path], atoms: ArrayLike, coords: ArrayLike, mode: f.write('ENDMDL\n') +def _mutation_ignore_sites(ensembles) -> Set[int]: + """Residue numbers to skip when auto-filling missing atoms.""" + ignore = set() + for ens in ensembles: + if isinstance(ens, xl.dRotamerEnsemble): + ignore.update({ens.site1, ens.site2}) + else: + ignore.add(ens.site) + return ignore + + +def _residue_is_protonated(residue, use_H: bool) -> bool: + """True when the input residue should keep an alternate protonation library.""" + if residue.resname in alt_prot_states: + return True + if not use_H or not any(residue.atoms.types == "H"): + return False + return _detect_alt_resname(residue, use_H) != residue.resname + + +def _detect_alt_resname(residue, use_H: bool) -> str: + """Resolve library resname from an MDAnalysis residue (mirrors RotamerEnsemble.from_mda).""" + res = residue.resname + if not use_H or res not in ralt_prot_states: + return res + if res == "TYR" and "HH" not in residue.atoms.names: + return ralt_prot_states[res].get(len(residue.atoms), res) + if res != "HIS": + return ralt_prot_states[res].get(len(residue.atoms), res) + if len(residue.atoms) == 18: + return "HIP" + if len([x for x in residue.atoms.names if "HE" in x]) == 2: + return "HIE" + if len([x for x in residue.atoms.names if "HD" in x]) == 2: + return "HID" + return "HIS" + + +def _residue_library_name(residue, use_H: bool) -> str: + if _residue_is_protonated(residue, use_H): + return _detect_alt_resname(residue, use_H) + return residue.resname + + +def _expected_residue_ensemble(residue, protein, use_H: bool, ignore_waters: bool, **kwargs): + """Build a RotamerEnsemble for fill operations with correct protonation library.""" + lib_res = _residue_library_name(residue, use_H) + ens = xl.RotamerEnsemble( + lib_res, + residue.resnum, + protein=protein, + chain=residue.segid, + use_H=use_H, + ignore_waters=ignore_waters, + eval_clash=False, + **kwargs, + ) + ens._fill_missing = True + ens._output_resname = ( + lib_res if _residue_is_protonated(residue, use_H) else residue.resname + ) + return ens + + +def _closest_rotamer_index(ensemble, residue) -> int: + """Index of the rotamer closest to atoms present in ``residue``.""" + res_atoms = residue.atoms.select_atoms("not altloc B") + name_to_pos = {a.name: a.position for a in res_atoms} + common = np.isin(ensemble.atom_names, list(name_to_pos.keys())) + if not np.any(common): + return int(np.argmax(ensemble.weights)) + idxs = np.argwhere(common).flatten() + target = np.array([name_to_pos[n] for n in ensemble.atom_names[idxs]]) + rmsds = np.linalg.norm(ensemble._coords[:, idxs] - target[None, :, :], axis=(1, 2)) + return int(np.argmin(rmsds)) + + +def _place_atom_from_ic( + i: int, + z_matrix_idxs: np.ndarray, + z_matrix: np.ndarray, + coords: np.ndarray, +) -> None: + """Place atom ``i`` from internal coordinates and already-set reference atoms.""" + bond_idx = z_matrix_idxs[i, 1] + if bond_idx < 0: + return + + r, theta, phi = z_matrix[i] + angle_idx = z_matrix_idxs[i, 2] + if angle_idx < 0: + coords[i, 0] = coords[bond_idx, 0] + r + return + + dihedral_idx = z_matrix_idxs[i, 3] + if dihedral_idx < 0: + x = r * np.cos(np.pi - theta) + y = r * np.sin(np.pi - theta) + coords[i, 0] = coords[bond_idx, 0] + x + coords[i, 1] = y + return + + sin_angle, sin_dihedral = np.sin(theta), np.sin(phi) + cos_angle, cos_dihedral = np.cos(theta), np.cos(phi) + x = r * cos_angle + y = r * cos_dihedral * sin_angle + z = r * sin_dihedral * sin_angle + + a = coords[dihedral_idx] + b = coords[angle_idx] + c = coords[bond_idx] + ab = b - a + bc = c - b + bc /= np.linalg.norm(bc) + n = np.cross(ab, bc) + n /= np.linalg.norm(n) + ncbc = np.cross(n, bc) + m = np.vstack([bc, ncbc, n]) + coords[i] = m.T @ np.array([-x, y, z]) + coords[bond_idx] + + +def _only_hydrogens_missing(ensemble, present: dict) -> bool: + """True when every missing library atom is a hydrogen.""" + missing = set(ensemble.atom_names) - set(present) + if not missing: + return False + return all(ensemble.atom_types[ensemble.atom_names == name][0] == "H" for name in missing) + + +def _sync_sidechain_dihedrals_from_present(ic_work, present: dict, dihedral_atoms) -> None: + """Update side-chain chi dihedrals in ``ic_work`` to match anchored heavy-atom positions.""" + ddefs = np.atleast_2d(dihedral_atoms) + if ddefs.size == 0: + return + + measured = [] + for atoms in ddefs: + if not all(atom in present for atom in atoms): + return + measured.append(get_dihedral([present[atom] for atom in atoms])) + + ic_work.set_dihedral( + measured, + ic_work.resnums[0], + ddefs, + chain=ic_work.chains[0], + ) + + +def _fill_missing_atoms_coords(residue, ensemble, rotamer_idx: int): + """ + Keep existing atom positions; add missing atoms using the closest aligned rotamer ICs. + + The closest rotamer provides bond lengths, angles, and dihedrals. Atoms already in the + input structure are anchored to their PDB coordinates. Missing atoms are placed by a + forward internal-coordinate walk from those anchors so X-H geometry stays consistent + with the crystal heavy-atom framework. + + When only protons are missing, side-chain chi dihedrals are set from the anchored + heavy-atom framework before hydrogens are placed (needed for aromatics such as TRP). + """ + atom_names = ensemble.atom_names + atom_types = ensemble.atom_types + + ensemble_heavy = set(atom_names[atom_types != "H"]) + present = { + a.name: a.position.copy() + for a in residue.atoms + if a.name in ensemble_heavy and getattr(a, "altLoc", "") != "B" + } + + ic_work = ensemble.internal_coords.copy() + ic_work.trajectory.frame = rotamer_idx + z_idxs = ic_work.z_matrix_idxs + z_mat = ic_work.z_matrix + + if _only_hydrogens_missing(ensemble, present): + from .MolSysIC import get_z_matrix + + lib_cart = ic_work.to_cartesian().copy() + z_lib = ic_work.z_matrix.copy() + _sync_sidechain_dihedrals_from_present( + ic_work, present, getattr(ensemble, "dihedral_atoms", []) + ) + lib_cart = ic_work.to_cartesian().copy() + coords_full = lib_cart.copy() + for i, name in enumerate(ic_work.atom_names): + if name in present: + coords_full[i] = present[name] + + missing_ic = [ + i for i, name in enumerate(ic_work.atom_names) if name not in present + ] + for i in missing_ic: + parent = z_idxs[i, 1] + if parent < 0: + continue + bond_vec = lib_cart[i] - lib_cart[parent] + bond_len = np.linalg.norm(bond_vec) + if bond_len > 1e-8: + coords_full[i] = coords_full[parent] + z_lib[i, 0] * (bond_vec / bond_len) + + z_matrix, chain_operator = get_z_matrix( + coords_full.copy(), ic_work.z_matrix_idxs, ic_work.chain_operator_idxs + ) + ic_work.trajectory.coordinate_array[rotamer_idx] = z_matrix + if ic_work.has_chain_operators: + ic_work._chain_operators = chain_operator + + for i, name in enumerate(ic_work.atom_names): + if name in present: + coords_full[i] = present[name] + for i in missing_ic: + _place_atom_from_ic(i, z_idxs, ic_work.z_matrix, coords_full) + else: + coords_full = ic_work.to_cartesian().copy() + for i, name in enumerate(ic_work.atom_names): + if name in present: + coords_full[i] = present[name] + else: + _place_atom_from_ic(i, z_idxs, z_mat, coords_full) + + coords = coords_full[ensemble.ic_mask] + return atom_names, atom_types, coords + + +def _select_rotamer_index( + ensemble, + rotamer_index: Union[int, str, None], + residue=None, +) -> int: + if rotamer_index == "closest" and residue is not None: + return _closest_rotamer_index(ensemble, residue) + if rotamer_index == "random": + return int(np.random.choice(len(ensemble.coords), p=ensemble.weights)) + if isinstance(rotamer_index, int): + return rotamer_index + return int(np.argmax(ensemble.weights)) + + def get_missing_residues( protein: Union[MDAnalysis.Universe, MDAnalysis.AtomGroup], ignore: Set[int] = None, use_H: bool = False, ignore_waters = True ) -> List: - """Get a list of RotamerEnsemble objects corresponding to the residues of the provided protein that are missing - heavy atoms. + """Get RotamerEnsemble objects for residues missing expected atoms (heavy and/or H). Parameters ---------- @@ -509,14 +748,13 @@ def get_missing_residues( Returns ------- missing_residues : list - A list of RotamerEnsemble objects corresponding to residues with missing heavy atoms. + RotamerEnsemble objects tagged with ``_fill_missing`` for coordinate fill only. """ ignore = set() if ignore is None else ignore missing_residues = [] - cache = {} + expected_cache = {} for res in protein.residues: - # Only consider supported residues because otherwise chiLife wouldn't know what's missing if ( res.resname not in SUPPORTED_RESIDUES or res.resnum in ignore @@ -524,20 +762,24 @@ def get_missing_residues( ): continue - # Check if there are any missing heavy atoms - heavy_atoms = res.atoms.types[res.atoms.types != "H"] - resn = res.resname + lib_res = _residue_library_name(res, use_H) + cache_key = (lib_res, use_H) + if cache_key not in expected_cache: + expected_cache[cache_key] = set( + xl.RotamerEnsemble( + lib_res, res.resnum, protein=protein, chain=res.segid, + use_H=use_H, ignore_waters=ignore_waters, eval_clash=False, + ).atom_names + ) - a = cache.setdefault(resn, len(xl.RotamerEnsemble(resn).atom_names)) - if len(heavy_atoms) != a: + present = { + a.name for a in res.atoms + if getattr(a, "altLoc", "") != "B" + } + if expected_cache[cache_key] - present: missing_residues.append( - xl.RotamerEnsemble( - res.resname, - res.resnum, - protein=protein, - chain=res.segid, - use_H=use_H, - ignore_waters=ignore_waters + _expected_residue_ensemble( + res, protein, use_H, ignore_waters, ) ) @@ -564,9 +806,9 @@ def mutate( rotamer_index : int, str, None Index of the rotamer to be used for the mutation. If None, the most probable rotamer will be used. If 'all', mutate will return an ensemble with each rotamer, if random, mutate will return an ensemble with a random - rotamer. + rotamer. If 'closest', use the rotamer closest to the existing residue coordinates. add_missing_atoms : bool - Model side chains missing atoms if they are not present in the provided structure. + Model missing atoms (heavy or H) without moving atoms already present in the structure. ignore_waters : bool ignore waters when selecting conforers for mutation. Returns @@ -589,10 +831,12 @@ def mutate( use_H = use_H if use_H is not None else param_from_rotlibs('use_H', ensembles) ignore_waters = ignore_waters if ignore_waters is not None else param_from_rotlibs('ignore_waters', ensembles) - missing_residues = get_missing_residues(protein, - ignore={res.site for res in ensembles}, - use_H=use_H, - ignore_waters=ignore_waters) + missing_residues = get_missing_residues( + protein, + ignore=_mutation_ignore_sites(ensembles), + use_H=use_H, + ignore_waters=ignore_waters, + ) ensembles = list(ensembles) + missing_residues @@ -611,7 +855,10 @@ def mutate( protein = protein.select_atoms('(not altloc B)') label_selstr = " or ".join([f"({label.selstr})" for label in ensembles]) - other_atoms = protein.select_atoms(f"not ({label_selstr})") + if label_selstr: + other_atoms = protein.select_atoms(f"not ({label_selstr})") + else: + other_atoms = protein.atoms resids = [res.resid for res in protein.residues] icodes = [res.icode for res in protein.residues] if hasattr(protein, "icodes") else None @@ -628,7 +875,19 @@ def mutate( # If the residue is the spin labeled residue replace it with the highest probability spin label if resloc in label_sites: rot_ens = label_sites[resloc] - if isinstance(rot_ens, xl.dRotamerEnsemble): + fill_missing = getattr(rot_ens, "_fill_missing", False) + if fill_missing: + src_res = res + r_idx = _select_rotamer_index(rot_ens, "closest", src_res) + names, types, positions = _fill_missing_atoms_coords(src_res, rot_ens, r_idx) + atom_info += [(i, name, atype) for name, atype in zip(names, types)] + res_names.append(getattr(rot_ens, "_output_resname", rot_ens.res)) + segidx.append(res.segindex) + offset = len(atom_info) - len(names) + _add_peptide_bond(atom_info, rot_ens, bonds) + bonds.extend([[b1 + offset, b2 + offset] for b1, b2 in rot_ens.bonds]) + rot_ens._fill_positions = positions + elif isinstance(rot_ens, xl.dRotamerEnsemble): r1l = len(rot_ens.rl1mask) r2l = len(rot_ens.rl2mask) both = r1l + r2l @@ -652,19 +911,21 @@ def mutate( ] else: raise RuntimeError("The residue specified is not part of the dRotamerEnsemble being constructed") + offset = len(atom_info) - len(rot_ens.atom_names) + _add_peptide_bond(atom_info, rot_ens, bonds) + bonds.extend([[b1 + offset, b2 + offset] for b1, b2 in rot_ens.bonds]) + res_names.append(rot_ens.res) + segidx.append(rot_ens.segindex) else: atom_info += [ (i, name, atype) for name, atype in zip(rot_ens.atom_names, rot_ens.atom_types) ] - - offset = len(atom_info) - len(rot_ens.atom_names) - _add_peptide_bond(atom_info, rot_ens, bonds) - bonds.extend([[b1+offset, b2 + offset] for b1, b2 in rot_ens.bonds]) - - # Add missing Oxygen from rotamer ensemble - res_names.append(rot_ens.res) - segidx.append(rot_ens.segindex) + offset = len(atom_info) - len(rot_ens.atom_names) + _add_peptide_bond(atom_info, rot_ens, bonds) + bonds.extend([[b1 + offset, b2 + offset] for b1, b2 in rot_ens.bonds]) + res_names.append(rot_ens.res) + segidx.append(rot_ens.segindex) # Else retain the atom information from the parent universe else: @@ -709,13 +970,12 @@ def mutate( else: for spin_label in label_sites.values(): sl_atoms = U.select_atoms(spin_label.selstr) - if rotamer_index == 'random': - rand_idx = np.random.choice(len(spin_label.coords), p=spin_label.weights) - sl_atoms.atoms.positions = spin_label.coords[rand_idx] - elif isinstance(rotamer_index, int): - sl_atoms.atoms.positions = spin_label.coords[rotamer_index] - else: - sl_atoms.atoms.positions = spin_label.coords[np.argmax(spin_label.weights)] + if getattr(spin_label, "_fill_positions", None) is not None: + sl_atoms.atoms.positions = spin_label._fill_positions + continue + src_res = protein.select_atoms(spin_label.selstr).residues[0] + r_idx = _select_rotamer_index(spin_label, rotamer_index, src_res) + sl_atoms.atoms.positions = spin_label.coords[r_idx] return U diff --git a/tests/test_MolSysIC.py b/tests/test_MolSysIC.py index dcb6fc1..4d8c09e 100644 --- a/tests/test_MolSysIC.py +++ b/tests/test_MolSysIC.py @@ -297,12 +297,13 @@ def test_chain_operators(): mx = np.array( [ - [0.38281548, 0.9238248, 0.0], - [0.92382485, -0.38281548, 0.0], - [0.0, 0.0, -0.99999994], - ] + [0.24165519, 0.83183837, -0.49964762], + [0.96677727, -0.2506125, 0.05035083], + [-0.08333419, -0.4952155, -0.8647643], + ], + dtype=np.float32, ) - ori = np.array([-0.449, -3.572, -1.666]) + ori = np.array([-0.308, -3.521, -1.117], dtype=np.float32) np.testing.assert_almost_equal(pic.chain_operators[0]["mx"], mx) np.testing.assert_almost_equal(pic.chain_operators[0]["ori"], ori) diff --git a/tests/test_ProteinUtils.py b/tests/test_ProteinUtils.py index 1f804cd..626c952 100644 --- a/tests/test_ProteinUtils.py +++ b/tests/test_ProteinUtils.py @@ -30,6 +30,7 @@ "CYM", "LYN", "HIP", + "TYM", ) + tuple(chilife.USER_LIBRARIES) + tuple(chilife.USER_dLIBRARIES) @@ -41,12 +42,15 @@ def test_read_dunbrack(res): res, phi, psi = res - dlib = chilife.read_bbdep(res, -70, 90) + dlib = chilife.read_bbdep(res, phi, psi) with np.load(f"test_data/{res}_{phi}_{psi}.npz", allow_pickle=True) as f: dlib_ans = {key: f[key] for key in f if key != "allow_pickle"} + skip = {"internal_coords"} for key in dlib_ans: + if key in skip: + continue if dlib_ans[key].dtype not in [np.dtype(f" np.ndarray: + """Return one off-rotamer Cartesian conformer (n_atoms, 3).""" + out = ensemble.sample(n=1, off_rotamer=True, remove_clashing=False) + coords = out[0] if isinstance(out, (tuple, list)) else out + coords = np.asarray(coords, dtype=float) + if coords.ndim == 3: + coords = coords[0] + return coords + + +def _heavy_residue(protein, site: int, segid: str, coord_dict: dict, heavy_names: set): + """Return a residue view with ensemble heavy-atom coordinates only.""" + heavy = protein.select_atoms(f"resid {site} and segid {segid}") + for atom in heavy: + if atom.name in heavy_names: + atom.position = coord_dict[atom.name] + return heavy.select_atoms(f"name {' '.join(sorted(heavy_names))}").residues[0] + + +def _max_h_displacement(truth_coords, inferred_coords, h_mask) -> float: + if not np.any(h_mask): + return 0.0 + return float(np.linalg.norm(inferred_coords[h_mask] - truth_coords[h_mask], axis=1).max()) + + +def _bad_xh_bonds(coords, types, bonds) -> int: + n_bad = 0 + for b1, b2 in bonds: + if types[b1] != "H" and types[b2] != "H": + continue + dist = np.linalg.norm(coords[b1] - coords[b2]) + maxd = float(bond_hmax((types[b1], types[b2]))) + if dist > maxd + 0.25 or dist < 0.7: + n_bad += 1 + return n_bad + + +@pytest.fixture(scope="module") +def off_rotamer_seed() -> int: + return 2026 + + +@pytest.mark.parametrize("resname", CANONICAL_AA) +def test_off_rotamer_proton_inference(resname, off_rotamer_seed): + """Infer protons on heavy-only off-rotamer conformers; compare to protonated truth.""" + pdb_path, site = _CANONICAL_SITES[resname] + np.random.seed(off_rotamer_seed + abs(hash(resname)) % 10_000) + + protein = mda.Universe(pdb_path, in_memory=True) + segid = protein.select_atoms(f"resid {site}").segids[0] + + ensemble = chilife.RotamerEnsemble( + resname, + site, + protein=protein, + use_H=True, + eval_clash=False, + ) + protonated = _sample_off_rotamer_coords(ensemble) + coord_dict = dict(zip(ensemble.atom_names, protonated)) + + heavy_names = set(ensemble.atom_names[ensemble.atom_types != "H"]) + heavy_res = _heavy_residue(protein, site, segid, coord_dict, heavy_names) + fill_ens = _expected_residue_ensemble( + heavy_res, protein, use_H=True, ignore_waters=True + ) + rot_idx = _closest_rotamer_index(fill_ens, heavy_res) + _, _, inferred = _fill_missing_atoms_coords(heavy_res, fill_ens, rot_idx) + + h_mask = ensemble.atom_types == "H" + heavy_mask = ~h_mask + + np.testing.assert_allclose( + inferred[heavy_mask], + protonated[heavy_mask], + atol=1e-3, + err_msg=f"{resname}: heavy atoms moved during proton fill", + ) + + max_h_err = _max_h_displacement(protonated, inferred, h_mask) + bad_bonds = _bad_xh_bonds(inferred, ensemble.atom_types, ensemble.bonds) + + assert bad_bonds == 0, ( + f"{resname}: {bad_bonds} X-H bonds out of tolerance after proton fill " + f"(max H displacement {max_h_err:.3f} A)" + ) + np.testing.assert_allclose( + inferred[h_mask], + protonated[h_mask], + atol=0.15, + err_msg=( + f"{resname}: inferred H differ from off-rotamer truth " + f"(max displacement {max_h_err:.3f} A)" + ), + )