Skip to content

Commit

Permalink
Merge pull request #33 from xchem/issue_1480
Browse files Browse the repository at this point in the history
Issue 1480
  • Loading branch information
ConorFWild authored Aug 28, 2024
2 parents 8ff2802 + 7f087ab commit a41ad7e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
9 changes: 3 additions & 6 deletions DEV-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: -
Expand Down
13 changes: 8 additions & 5 deletions src/xchemalign/aligner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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():
Expand Down Expand Up @@ -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 = {}

Expand All @@ -487,14 +489,15 @@ 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
new_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)
Expand Down

0 comments on commit a41ad7e

Please sign in to comment.