diff --git a/devtools/conda-build/meta.yaml b/devtools/conda-build/meta.yaml index f007a47..c451daf 100644 --- a/devtools/conda-build/meta.yaml +++ b/devtools/conda-build/meta.yaml @@ -25,7 +25,6 @@ requirements: - python >=3.9 - biopython >=1.84 - dssp - - git - h5py - hdf5plugin - numpy >=1.21.6,<1.28.0 # pinned for scipy diff --git a/tests/struct_info/test_pyrosetta_flag.py b/tests/struct_info/test_pyrosetta_flag.py index a8c6a1b..6def755 100644 --- a/tests/struct_info/test_pyrosetta_flag.py +++ b/tests/struct_info/test_pyrosetta_flag.py @@ -52,6 +52,16 @@ def test_pyrosetta_flag(): os.remove('sinfo_pyrosetta_default.hdf5') +def test_pyrosetta_no_charge_and_sasa(): + try: + import pyrosetta + except ModuleNotFoundError: + print("[warning] Cannot import pyrosetta -- skipping pyrosetta test") + return + + from zernikegrams.structural_info.pyrosetta_core import get_structural_info_from_protein__pyrosetta + get_structural_info_from_protein__pyrosetta("tests/data/pdbs/1bkx.pdb", False, False, False, False) + if __name__ == '__main__': test_pyrosetta_flag() diff --git a/zernikegrams/structural_info/pyrosetta_core.py b/zernikegrams/structural_info/pyrosetta_core.py index 4e1653f..0270439 100644 --- a/zernikegrams/structural_info/pyrosetta_core.py +++ b/zernikegrams/structural_info/pyrosetta_core.py @@ -130,9 +130,13 @@ def get_structural_info_from_protein__pyrosetta( element = pose.residue_type(i).element(j).name if calculate_SASA: sasa = atom_sasa.get(atom_id) + else: + sasa = 0 curr_coords = coords_rows[k] if calculate_charge: charge_pyrosetta = pose.residue_type(i).atom_charge(j) + else: + charge_pyrosetta = 0 res_id = np.array([ aa,