Skip to content

Commit ed402dd

Browse files
committed
Merge branch 'v0.3.0'
2 parents c15f2e3 + d4b8536 commit ed402dd

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
![alt text](./_images/PyBILT_logo.png "PyBILT Logo")
22
# *Py*thon based lipid *BIL*ayer molecular simulation analysis *T*oolkit
33
------
4-
![Python version badge](https://img.shields.io/badge/python-2.7%2C3.6%2C3.7-blue.svg)
4+
![Python version badge](https://img.shields.io/badge/python-3.7-blue.svg)
55
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE)
66
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/2d6da71328a24ef6930ad8f554074292)](https://www.codacy.com/manual/blakeaw1102/PyBILT?utm_source=github.com&utm_medium=referral&utm_content=LoLab-VU/PyBILT&utm_campaign=Badge_Grade)
7-
![version](https://img.shields.io/badge/version-0.2.0-orange.svg)
8-
[![release](https://img.shields.io/github/release-pre/LoLab-VU/PyBILT.svg)](https://github.com/LoLab-VU/PyBILT/releases/tag/v0.2.0)
7+
![version](https://img.shields.io/badge/version-0.3.0-orange.svg)
8+
[![release](https://img.shields.io/github/release-pre/LoLab-VU/PyBILT.svg)](https://github.com/LoLab-VU/PyBILT/releases/tag/v0.3.0)
99
[![Anaconda-Server Badge](https://anaconda.org/blakeaw/pybilt/badges/version.svg)](https://anaconda.org/blakeaw/pybilt)
1010
[![Documentation Status](https://readthedocs.org/projects/pybilt/badge/?version=latest)](http://pybilt.readthedocs.io/en/latest/?badge=latest)
1111
[![DOI](https://zenodo.org/badge/85123567.svg)](https://zenodo.org/badge/latestdoi/85123567)
@@ -33,7 +33,7 @@ The analyses include:
3333

3434
### Core dependencies
3535
**PyBILT** has the following core dependencies:
36-
* [MDAnalysis](https://www.mdanalysis.org/)
36+
* [MDAnalysis](https://www.mdanalysis.org/) > 1.0
3737
* [NumPy](http://www.numpy.org/)
3838
* [SciPy](https://www.scipy.org/)
3939
* [Matplotlib](https://matplotlib.org/)
@@ -42,16 +42,12 @@ The analyses include:
4242
* [future](http://python-future.org/)
4343

4444
### Python version support
45-
The `pybilt` package has been tested using [Anaconda Python](https://www.anaconda.com/) 2.7, 3.6, and 3.7.
46-
47-
#### Sunsetting of Python 2
48-
Please be aware that Python 2 is scheduled to be sunset on January 1 2020. You can read about it here: [https://www.python.org/doc/sunset-python-2/](https://www.python.org/doc/sunset-python-2/)
49-
Parallel to the sunsetting of Python 2 many open source packages are also dropping support for Python 2 ([https://python3statement.org/](https://python3statement.org/)), including some of **PyBILT**'s core dependencies. As such, after January 1, 2020, **PyBILT** will also likely sunset its support for Python 2.7.
45+
The `pybilt` package has been tested using [Anaconda Python](https://www.anaconda.com/) 3.7 and MDAnalysis=1.1.1.
5046

5147
### pip install
5248
You can install the latest version of the `pybilt` package using `pip` sourced from the GitHub repo:
5349
```
54-
pip install -e git+https://github.com/LoLab-VU/PyBILT@v0.2.0#egg=pybilt
50+
pip install -e git+https://github.com/LoLab-VU/PyBILT@v0.3.0#egg=pybilt
5551
```
5652
However, this will not automatically install the core dependencies. You will have to do that separately:
5753
```

pybilt/bilayer_analyzer/analysis_protocols.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3548,12 +3548,14 @@ def run_analysis(self, ba_settings, ba_reps, ba_mda_data):
35483548
residues = self.selection.residues
35493549
cos_run = RunningStats()
35503550
for residue in residues:
3551-
atom_1 = eval("residue.{}".format(self.settings['ref_atom_1']))
3552-
atom_2 = eval("residue.{}".format(self.settings['ref_atom_2']))
3551+
#atom_1 = eval("residue.{}".format(self.settings['ref_atom_1']))
3552+
#atom_2 = eval("residue.{}".format(self.settings['ref_atom_2']))
3553+
atom_1 = residue.atoms.select_atoms('name {}'.format(self.settings['ref_atom_1']))
3554+
atom_2 = residue.atoms.select_atoms('name {}'.format(self.settings['ref_atom_2']))
35533555
#atom_1 = ast.literal_eval("residue.{}".format(self.settings['ref_atom_1']))
35543556
#atom_2 = ast.literal_eval("residue.{}".format(self.settings['ref_atom_2']))
3555-
atom_1_i = atom_1.index
3556-
atom_2_i = atom_2.index
3557+
atom_1_i = atom_1.indices[0]
3558+
atom_2_i = atom_2.indices[0]
35573559
atom_1_coord = ba_reps['current_mda_frame'].positions[atom_1_i]
35583560
atom_2_coord = ba_reps['current_mda_frame'].positions[atom_2_i]
35593561
diff = atom_2_coord - atom_1_coord
@@ -3687,10 +3689,10 @@ def run_analysis(self, ba_settings, ba_reps, ba_mda_data):
36873689
residues = self.selection.residues
36883690
cos_run = RunningStats()
36893691
for residue in residues:
3690-
atom_1 = eval("residue."+self.settings['ref_atom_1'])
3691-
atom_2 = eval("residue."+self.settings['ref_atom_2'])
3692-
atom_1_i = atom_1.index
3693-
atom_2_i = atom_2.index
3692+
atom_1 = residue.atoms.select_atoms('name {}'.format(self.settings['ref_atom_1']))
3693+
atom_2 = residue.atoms.select_atoms('name {}'.format(self.settings['ref_atom_2']))
3694+
atom_1_i = atom_1.indices[0]
3695+
atom_2_i = atom_2.indices[0]
36943696
atom_1_coord = ba_reps['current_mda_frame'].positions[atom_1_i]
36953697
atom_2_coord = ba_reps['current_mda_frame'].positions[atom_2_i]
36963698
diff = atom_2_coord - atom_1_coord

pybilt/bilayer_analyzer/com_frame.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,15 @@ def extract(self, mda_residue, unwrap=False, box=None, name_dict=None, make_whol
6666

6767
self.atom_names = names
6868
n_names = len(names)
69-
atom_group = mda.core.AtomGroup.AtomGroup([eval("mda_residue.atoms."+names[0])])
69+
#print(mda_residue.atoms.select_atoms('name {}'.format(names[0])))
70+
#atom_group = mda.core.groups.AtomGroup([eval("mda_residue.atoms."+names[0])])
71+
atom_group = mda_residue.atoms.select_atoms('name {}'.format(names[0]))
7072
#if (not unwrap) and (n_names > 1):
7173
# mda.lib.mdamath.make_whole(mda_residue.atoms, reference_atom=atom_group)
7274

7375
for i in range(1, n_names):
74-
atom_group+=eval("mda_residue.atoms."+names[i])
76+
#atom_group+=eval("mda_residue.atoms."+names[i])
77+
atom_group += mda_residue.atoms.select_atoms('name {}'.format(names[i]))
7578

7679
#else:
7780
if (not unwrap) and make_whole:

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from distutils.core import setup
22

33
setup(name='pybilt',
4-
version='0.2.0',
4+
version='0.3.0',
55
description='Lipid bilayer analysis toolkit.',
66
author='Blake A. Wilson',
77
author_email='[email protected]',
@@ -11,5 +11,5 @@
1111
'pybilt.lipid_grid', 'pybilt.mda_tools',
1212
'pybilt.plot_generation'],
1313
license='MIT',
14-
keywords=['lipid bilayer', 'molecular dynamics', 'analysis']
14+
keywords=['lipid bilayer', 'molecular dynamics', 'analysis']
1515
)

0 commit comments

Comments
 (0)