Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/chilife/RotamerEnsemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def protein_setup(self):
raise RuntimeError('Both `minimize` and `eval_clash` options have been selected, but they are incompatible.'
'Please select only one. Also note that minimize performs its own clash evaluations so '
'eval_clash is not necessary.')
elif self.eval_clash:
elif self.eval_clash and len(self.side_chain_idx):
self.evaluate()

elif self._minimize:
Expand Down
2 changes: 1 addition & 1 deletion src/chilife/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
# SpinLabel = SpinLabel.SpinLabel
# dSpinLabel = dSpinLabel.dSpinLabel

__version__ = "1.2.4"
__version__ = "1.2.5"
4 changes: 3 additions & 1 deletion src/chilife/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,9 @@ def read_bbdep(res: str, Phi: int, Psi: int) -> Dict:

else:
lib["weights"] = np.array([1])
lib["dihedrals"], lib["sigmas"], dihedral_atoms = [], [], []
lib["dihedrals"] = np.zeros((1, 0))
lib["sigmas"] = np.zeros((1, 0))
dihedral_atoms = []
coords = ICs.to_cartesian()[None, ...]
internal_coords = ICs.copy()

Expand Down
9 changes: 9 additions & 0 deletions tests/test_ProteinUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ def test_mutate3():
assert len(labeled_protein.atoms) != len(protein.atoms)


def test_mutate_ala_gly_eval_clash():
protein = mda.Universe("test_data/1omp_H.pdb").select_atoms("protein")
D41G = chilife.RotamerEnsemble("GLY", 41, protein=protein)
S238A = chilife.RotamerEnsemble("ALA", 238, protein=protein)
mPro = chilife.mutate(protein, D41G, S238A, add_missing_atoms=False)
assert mPro.select_atoms("resnum 41").residues[0].resname == "GLY"
assert mPro.select_atoms("resnum 238").residues[0].resname == "ALA"


def test_mutate4():
protein = mda.Universe("test_data/1omp_H.pdb").select_atoms("protein")
D41G = chilife.RotamerEnsemble("GLY", 41, protein=protein, eval_clash=False)
Expand Down
Loading