-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add EM Support #4
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create `pyproject.toml` to define build system requirements and project metadata. This includes dependencies, author details, homepage URL, and entry points for command-line scripts. Configuration for `scikit-build` and `cibuildwheel` is also included to manage build and deployment processes.
Removed the `sails-density.cpp` and `sails-density.h` files to streamline the codebase. This also includes the deletion of all associated classes, methods, and functions related to density calculation, scoring, and MTZ file handling from these files.
Moved density-related source files to a dedicated subdirectory for better organization and maintainability. This includes splitting `sails-density.cpp` into multiple files under `src/cpp/density`.
Introduced Python bindings for `std::vector<float>` and `gemmi::Grid<float>`, enabling the manipulation of grid data within the module. Added `get_sails_map` and `extract_gemmi_grid` functions to facilitate the extraction of grid data from various gemmi objects and file paths.
Introduces a new `glycosylate_em` function for processing EM data. Refactors the CLI to support both X-ray and EM modes, and updates the argument parsing to accommodate these changes.
Introduces the XtalDensity class to handle advanced density map calculations using Clipper and Gemmi libraries. It includes methods for initialising HKL data, loading grids, forming atom lists, recalculating maps, and computing Po-Pc maps from structures.
This change includes the mmdb2 dependencies directory in the CMake include directories list. It ensures that the build system can locate mmdb2 header files during compilation, which may be necessary for projects depending on this library.
Changed `gemmi::Mtz&` to `const gemmi::Mtz&` in `form_sails_mtz` to improve const correctness. Ensured all column pointers are also const to prevent unintended modifications. Added missing `#include "gemmi/mtz.hpp"` for completeness.
Introduced the EMDensity class in the density module to manage and process various density maps. This includes functionalities for retrieving MTZ objects, grid maps, and calculated maps, as well as initializing and updating map details in the constructor.
Remove constructor and helper methods from Density class, which are now derived from a base class. Introduce getter methods for accessing MTZ files and calculated grids. Modify existing methods to use these getters, enhancing modularity and code clarity.
Reformatted existing code for better readability and consistency. Added new class and function bindings including `MTZ`, `SailsOutput`, `GlycoSite`, `Dot`, `Grid`, and `AxisOrder`. Enhanced glycosylation functions with new overloads to support grids.
Simplified the glycosylation functions by removing redundant object functions and utilizing direct functions. Updated the `glycosylate_em` function to handle `grid` instead of `mtz`, and enhanced the `extract_gemmi_grid` to fully initialize the grid with additional attributes.
Updated the import statements in __init__.py to use simplified glycosylation function names. Removed redundant '_from_objects' suffix to improve code readability and consistency. Also, added the new 'AxisOrder' import.
Integrate new functions to support N-, C-, and O-glycosylation for electron microscopy (EM) structures. Refactor density handling to distinguish between X-ray and EM densities, and make various structural adjustments and cleanup to improve code readability and maintenance.
Introduced default constructors to Cell and MTZ structs for better initialization flexibility. Also added an overloaded Output constructor without the MTZ parameter and default-initialized the MTZ member in the Output struct.
Replace default std::unordered_map initialization of `calculated_maps` with an empty constructor for clarity. This change ensures that the map is explicitly empty upon creation.
Eliminate unused CCP4 map writing operations within the EMDensity constructor to streamline the code and improve maintainability. The function now focuses solely on initializing the grid.
Introduced calculate_density_for_box to calculate density for a Residue object within a specified Box. Updated the documentation for consistency and clarity, and removed the unutilized Density class.
Added new `calculate_density_for_box` method with 'box' parameter for custom grid calculation, and differentiated it from the existing `calculate_density_for_grid` method. Replaced calls to `calculate_density_for_box` with `calculate_density_for_grid` where applied.
Changed topology structure assignment to use a direct pointer to the structure. Removed the creation of an unnecessary MTZ output in the process method, streamlining the function.
Replaced direct unit cell assignments with set_unit_cell() method for cleaner code. Added set_spacing() method to allow explicit control over grid spacing. Improved type casting in set_data for better safety and clarity.
Removed extraneous print statements and added file writing and log saving in the glycosylate.py EM function. Also, included the setting of grid spacing in the interface.py file to complete grid initialization.
Introduce `DensityScoreMethod` to `EMDensity` and `XtalDensity` classes for enhanced scoring flexibility. This update includes new methods for retrieving the score method and scoring superposition results.
Also added documentation for private methods and variables
Reorganized the Table of Contents by splitting 'Automated-Glycan-Building.topic' into 'Automated-Xray-Glycan-Building.topic' and 'Automated-EM-Glycan-Building.topic'. This change enhances clarity and structure in documentation.
Introduce documentation for automated glycan building using electron microscopy and X-ray crystallography in Sails. These topics cover command syntax, options, and usage examples to guide users in implementing these methods in their projects.
Added the verbose flag (-v) to both the NucleoFind and pytest installation steps within the GitHub Actions workflow. This change will provide more detailed output during the installations, aiding in debugging and ensuring clearer log information.
Renamed the _setup.py file to setup.py for better clarity and convention. This change includes keeping the content of the file intact, ensuring that the handling of version extraction and package setup remains the same.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description