Skip to content
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

Multiple molecules #3

Merged
merged 7 commits into from
Oct 18, 2024
Merged

Multiple molecules #3

merged 7 commits into from
Oct 18, 2024

Conversation

comecattin
Copy link
Owner

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 in load_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 in load_molecule_from_tinker_xyz by introducing the is_single_molecule and load_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: Introduced create_graph and split_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 tests test_aspirin_xyz and test_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: Updated generate_local_frame to call mol.UpdatePropertyCache() before embedding the molecule, ensuring that the molecule's properties are up to date.
  • src/sulley/sulley.py: Modified the main 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.

@comecattin comecattin added bug Something isn't working enhancement New feature or request labels Oct 18, 2024
@comecattin comecattin self-assigned this Oct 18, 2024
@comecattin comecattin merged commit 5a8ffd0 into main Oct 18, 2024
1 check passed
@comecattin comecattin deleted the multiple_molecules branch October 18, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant