diff --git a/DEV-GUIDE.md b/DEV-GUIDE.md index 693440a..01438bf 100644 --- a/DEV-GUIDE.md +++ b/DEV-GUIDE.md @@ -12,19 +12,16 @@ This supersedes [Fragalysis-API](https://github.com/xchem/fragalysis-api). Project dependencies are defined in the `pyproject.toml` file. -You will need to use Python 3.10 or 3.11 (a requirement of the `pyproject.toml` file). -Python 3.12 cannot currently be used. - +You will need to use Python 3.10 or later (a requirement of the `pyproject.toml` file). If you prefer to use [conda] you can create a Python 3.10 environment using the -`environment.yaml` in this project, otherwise, if you have Python 3.10 or 3.11, +`environment.yaml` in this project, otherwise, if you have Python 3.10 or later, you can create an environment using the built-in `venv` module: - python -m venv venv source venv/bin/activate pip install --upgrade pip -Make sure you create the venv using Python 3.10 or 3.11 (e.g. change the first command to `python3.11 -m venv venv` -if needed). +Make sure you create the venv using Python 3.10 (or later). From your clean virtual environment you can now install the run-time and development dependencies like this: - diff --git a/src/xchemalign/aligner.py b/src/xchemalign/aligner.py index fe74dee..b9064ac 100644 --- a/src/xchemalign/aligner.py +++ b/src/xchemalign/aligner.py @@ -20,6 +20,7 @@ import gemmi from rich.traceback import install +install(show_locals=True) # Local alignment imports from ligand_neighbourhood_alignment import constants as lna_constants @@ -65,8 +66,6 @@ from xchemalign.utils import Constants from xchemalign.pdb_xtal import PDBXtal -install(show_locals=True) - def try_make(path): if not Path(path).exists(): @@ -461,8 +460,11 @@ def _perform_alignments(self, meta): assembly_landmarks = {} # Get the assembly transforms - if working_fs_model.assembly_landmarks.exists(): - assembly_transforms = ah.load_yaml(working_fs_model.assembly_landmarks, lambda x: x) + if working_fs_model.assembly_transforms.exists(): + assembly_transforms = ah.load_yaml( + working_fs_model.assembly_transforms, + lambda x: x + ) else: assembly_transforms = {} @@ -487,6 +489,7 @@ def _perform_alignments(self, meta): assembly_landmarks, assembly_transforms, self.version_dir.name[7:], + ) # Update the metadata_file with aligned file locations and site information @@ -494,7 +497,7 @@ def _perform_alignments(self, meta): # Add the xtalform information meta_xtalforms = {} - xtalforms = read_yaml(updated_fs_model.xtalforms) + xtalforms = readĪ€_yaml(updated_fs_model.xtalforms) for xtalform_id, xtalform in xtalforms[Constants.META_XTALFORMS].items(): xtalform_reference = xtalform[Constants.META_REFERENCE] reference_structure = gemmi.read_structure(datasets[xtalform_reference].pdb) # (xtalform_reference).pdb)