Skip to content

Commit

Permalink
they modified the API in the new version, MDAnalysis/mdanalysis#1359
Browse files Browse the repository at this point in the history
  • Loading branch information
weiHelloWorld committed Sep 29, 2017
1 parent ff84795 commit 7e80f15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def mark_and_modify_pdb_for_calculating_RMSD_for_plumed(pdb_file, out_pdb,

temp_bfactors = np.zeros(len(temp_atoms))
temp_bfactors[indices] = 1
temp_atoms.bfactors = temp_bfactors
temp_atoms.tempfactors = temp_bfactors
temp_atoms.occupancies = temp_bfactors
temp_atoms.write(out_pdb)
return out_pdb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def test_mark_and_modify_pdb_for_calculating_RMSD_for_plumed():
get_index_list_with_selection_statement('../resources/1l2y.pdb', 'name CA'))
a = Universe(temp_out)
b = a.select_atoms('name CA')
assert np.all(b.bfactors) and np.all(b.occupancies)
assert np.all(b.tempfactors) and np.all(b.occupancies)
b = a.select_atoms('not name CA')
assert not (np.any(b.bfactors) or np.any(b.occupancies))
assert not (np.any(b.tempfactors) or np.any(b.occupancies))
subprocess.check_output(['rm', temp_out])
return

Expand Down

0 comments on commit 7e80f15

Please sign in to comment.