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

Make compatible with Python 3 #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Make compatible with Python 3 #35

wants to merge 1 commit into from

Conversation

j-wags
Copy link
Contributor

@j-wags j-wags commented Jan 4, 2020

I'm working on this in my free time, if for no other reason than to better understand python 2-to-3 migrations.

Basically all real changes have been in pymolecule.py. The rest of the files are just vanilla output from running 2to3.py.

This PR aims to

  • Make tests pass on python 3
  • black the whole codebase (thanks for the tip, @Seanny123)

Future PRs will

  • Migrate tests to pytest
  • Replace pymolecule with MDAnalysis, which is better in literally every way
  • Get this up on conda-forge

This was referenced Jan 4, 2020
@j-wags
Copy link
Contributor Author

j-wags commented Jul 14, 2020

I attended a talk by Jacob Durrant (original POVME author!) a few months ago, and in chatting afterwards, he pointed out that he'd upgraded POVME2 to Python 3. There may be some good tips on the migration here: https://git.durrantlab.pitt.edu/jdurrant/POVME

@Seanny123
Copy link

Looking at Durrant's code, he chose to keep pymolecule.py and update it. So the easiest way forward would probably be copying over his code.

That being said, I'm currently trying to learn how to leverage MDAnalysis in various projects. If you could point me towards the simplest test-case you can find, I'd like to give a shot at replacing pymolecule with MDAnalysis.

@j-wags
Copy link
Contributor Author

j-wags commented Nov 8, 2020

Sorry to drop this conversation -- Totally lost track of this!

A drop-in replacement of pymolecule from Durrant's repo might work here. I can't recall if I'd made modifications to it that modified the behavior or API in reverse-incompatible ways, but it'd be worth a try.

The MDAnalysis documentation is really top-notch, and the simplest POVME test is probably defined_region_inclusion.

IIRC, when I'd looked at incorporating MDAnalysis earlier, there were some deep differences between the MDAnalysis Universe and and pymolecule Molecule object models that would make it tricky. Unfortunately I think that the complexity of the behaviors that need to be replicated might make this a somewhat challenging task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants