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.
This pull request introduces significant enhancements to the
sulley
module, focusing on handling multiple molecules, improving graph-based molecule processing, and updating tests to ensure correctness. The most important changes include adding support for handling multiple molecules inload_molecule_from_tinker_xyz
, integrating graph-based molecule processing functions, and updating tests to reflect these changes.Enhancements to molecule handling and processing:
src/sulley/extract_neighbors.py
: Added support for handling multiple molecules inload_molecule_from_tinker_xyz
by introducing theis_single_molecule
andload_molecule_from_graph
functions. These changes ensure that the function can return a list of molecules if multiple molecules are present. [1] [2] [3]src/sulley/symmetry.py
: Introducedcreate_graph
andsplit_disconnected_graphs
functions to support graph-based molecule processing. These functions create a graph from a molecule and split it into disconnected subgraphs, respectively. [1] [2] [3]Updates to tests:
test/poltype/test_loader.py
: Added new teststest_aspirin_xyz
andtest_aspirin_ethanol_multiple_xyz
to validate the functionality of handling single and multiple molecules, ensuring that the generated local frames match expected outputs.Miscellaneous updates:
src/sulley/local_frame.py
: Updatedgenerate_local_frame
to callmol.UpdatePropertyCache()
before embedding the molecule, ensuring that the molecule's properties are up to date.src/sulley/sulley.py
: Modified themain
function to handle lists of molecules when generating local frames, printing status messages and writing output files for each molecule.These changes collectively enhance the functionality and robustness of the
sulley
module, particularly in handling complex molecular structures and ensuring accurate local frame generation.