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

Adds centre of geometry and centre of mass functionality #47

Merged
merged 62 commits into from
Jan 8, 2024
Merged

Adds centre of geometry and centre of mass functionality #47

merged 62 commits into from
Jan 8, 2024

Conversation

arm61
Copy link
Collaborator

@arm61 arm61 commented Nov 14, 2023

No description provided.

Copy link
Collaborator Author

@arm61 arm61 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the new tutorial so that it will appear on the documentation pages. This would involve editing the notebooks.md file and adding this tutorial to the list.

"import matplotlib.pyplot as plt\n",
"from kinisi.analyze import DiffusionAnalyzer\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\", category=UserWarning)"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does an error get raised if you don't have this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suppresses warnings about missing atom mass data from MDAnalysis, although these warnings are very small:
"UserWarning: Failed to guess the mass for the following atom types: SI warnings.warn("Failed to guess the mass for the following atom types: {}".format(atom_type))"

]
},
{
"cell_type": "code",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you delete the final empty cell please.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

kinisi/parser.py Show resolved Hide resolved
kinisi/parser.py Outdated
new_drift_indices = list(range(n_molecules, n_molecules + len(drift_indices)))

if new_coords.shape[2] != 1:
new_coords = np.expand_dims(new_coords, axis=2)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there code duplication that we can avoid here?

@arm61
Copy link
Collaborator Author

arm61 commented Jan 8, 2024

I think this is ready to merge. Are you happy for me to go ahead @jd15489?

@jd15489
Copy link
Contributor

jd15489 commented Jan 8, 2024

I am happy for it to be merged.

@arm61 arm61 merged commit 2a2cfba into bjmorgan:master Jan 8, 2024
4 checks passed
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