Extending Polymer Analysis and Support [ GSoC 2025 Project Perspective ] #4935
Replies: 7 comments 21 replies
-
Hello @TRY-ER , welcome in the MDA community. Are you aiming to develop polymer-related code for GSOC 2025 or are you asking in general? EDIT: From your subject it looks like the former, so I assume you're asking if what you're proposing is in scope for a self-proposed GSoC project. At first glance I'd say yes, that could be interesting. Starting with an analysis of what is needed, where current MDA falls short, and concrete objectives for how to enhance the code base would be good. A common question for enhancements is "Could this be written as an MDAKit?" so you should be thinking about if your changes need to be in the core library (https://github.com/MDAnalysis/mdanalysis/) or if they could be their own MDAKit. |
Beta Was this translation helpful? Give feedback.
-
Hey @orbeckst , Should I be sharing the details of my proposed contribution here in the discussion? Is there a more convenient way to share it, like DM you or using the private channel in Discord? |
Beta Was this translation helpful? Give feedback.
-
I came up with the above points by exploration and sample utilization of the tooling from MDA. In case there are other better ways to handle polymers, I am eager to know, learn, and implement them. |
Beta Was this translation helpful? Give feedback.
-
Hi, Apologies for the late response! @orbeckst @micaela-matta The following are mock-up codes of the implementation. The code highlights the example for the user/developer end. # implementation of the polymer topology and trajectory generation and mapping from its representations
from MDAnalysis as mda
from mdapoly import PolymerHandler
from mdapoly.mapper import PolymerTopologyMapper
from mdapoly.config import DEFAULT_CONFIG
from mdapoly.generate import get_tpr_trr
mapper = PolymerToplologyMapper(path=’path-to-the-existing-polymer-topology-and-trajectory) # in case the topology and trajectory are stored in disk
# mapper = PolymerToplologyMapper(object=UniverseCollectionObject) # in case the topology and trajectory are mapped in memory
psmiles_handler = PolymerHandler(input_type = ‘psmiles’, mapper=mapper, generator=get_tpr_trr)
sample_psmiles = [“[*]CC[*]”]
topology_blobs, trajectory_blobs = psmiles_handler.handle(source=sample_psmiles, **DEFAULT_CONFIG)
# the above line will perform following steps
# 1. Check for the validity of the entries
# 2. Form the unique representations of the entries
# 3. Pass to the mapper to find the equivalent topology and trajectory
# i. In case of no match, generate using the self.generator and add the generation to the mapper
# ii. In case there is a match, return the stored topology and trajectory
# 4. Return the topology and trajectory for the candidates
u = mda.Universe(topology_blob[0], trajectory_blob[0])
# required validation operations can be performed for the candidate from here # Interfacing with DeepChem
from MDAnalysis as mda
from mdapoly import PolymerHandler
from mdapoly.mapper import PolymerTopologyMapper
from mdapoly.generate import get_tpr_trr
from deepchem.generator.pipelines import PolymerGeneratorPipeline, PostMDValidator
mapper = PolymerToplologyMapper(path=’path-to-the-existing-polymer-topology-and-trajectory) # in case the topology and trajectory are stored in disk
# mapper = PolymerToplologyMapper(object=UniverseCollectionObject) # in case the topology and trajectory are mapped in memory
psmiles_handler = PolymerHandler(input_type = ‘psmiles’, mapper=mapper, generator=get_tpr_trr)
post_validator = PostMDValidator(handler=psmiles_handler)
generator_pipeline = PolymerGeneratorPipeline(output_type =’psmiles’, post_validator=post_validator)
candidates, validation_outputs = generator_pipeline.generate(num_gen=10, requirements_config={})
# the above line will perform following steps
# 1. Use the generator to generate candidates iteratively
# 2. Use an internal discriminator to come up with some filtered candidates
# 3. Pass the candidates to the MDAKit for post-generation validation
# 4. Use the requirement_config with MDA Universe to check if candidates conform as expected
# 5. The pipeline returns the candidates along with the matched simulation outputs |
Beta Was this translation helpful? Give feedback.
-
Hey @orbeckst, I just submitted the pre-proposal using the Google form. I was expecting a submission in the form of a document. Anyway, I shared it in text form. Considering your advice to focus more on the functionality of MDAnalysis, I added details about form factor analysis of polymer in scattering systems. I also added another version of mean-distance displacement, which considers the rigid parts of the polymer as beads and operates considering coordinates at its centroid. I added details of functionalities for analysis of random force fields on the polymer chain under solvent drag and defined external trajectory. Along with these features for trajectory analysis, I focused on an MDAKit that handles the polymer representation to set up a core ChainGroup to access these analysis features easily. Is there a way I could share the pre-proposal I prepared as a document, so it would be easy to illustrate and understand? In terms of concepts, there were equations and references that I could not include in the text form through the Google Forms response. |
Beta Was this translation helpful? Give feedback.
-
Hey @orbeckst , |
Beta Was this translation helpful? Give feedback.
-
Hi @orbeckst , Thank you for your guidance and support. Although I have not been selected for GSoC, I would still like to continue contributing. I will work on the polymer kit for the corresponding application on my own. At a later stage, if you evaluate it as a good contribution, we can include it in the registry. Congratulations to everyone selected for GSoC! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello coders and researchers,
I've been diving into MDAnalysis for molecular dynamics and simulations, and I'm impressed by the extensive support it offers for various tasks. Since my work focuses on polymers, I've encountered challenges when trying to simulate their dynamics and explored MDAnalysis for potential solutions. Currently, it provides some support for polymer analysis through the
PersistenceLength
class inMDAnalysis.analysis.polymer
, though a few methods trigger deprecation warnings.Converters like
RDKitParser
inMDAnalysis.converters
can process certain PSMILES to generate polymer topologies, but they fall short when it comes to depicting polymers as weighted graph representations. Additionally, transformations inMDAnalysis.transformations
don’t always align well with the repetitive nature of polymers. After exploring the codebase extensively, these are the insights I've gathered so far.I propose developing additional analysis tools for polymers, enhancing converters to interpret polymer topologies from different formats, refining transformation configurations, and improving exception handling. I also aim to contribute to visualization setups for polymer chains.
I would greatly appreciate your feedback on how I should proceed or any suggestions for better approaches in this area.
Looking forward to your thoughts!
Beta Was this translation helpful? Give feedback.
All reactions