Skip to content

Commit

Permalink
remove sphinx bootstrap theme, for readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
corinwagen committed Feb 4, 2020
1 parent 7e2d66e commit 31f2680
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cctk/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def align(self, align_to=1, atoms=None):
Args:
align_to (int): which geometry to align to (1-indexed)
atoms (list): which atoms to align in each molecule (1-indexed; must be at least 3)
alternatively, specify "None" for all atoms or "heavy" for all heavy atoms
alternatively, specify ``None`` for all atoms or "heavy" for all heavy atoms
Returns:
a new Ensemble() object with the objects aligned
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

html_theme = 'bootstrap'
import sphinx_bootstrap_theme
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
#html_theme = 'bootstrap'
#import sphinx_bootstrap_theme
#html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
28 changes: 26 additions & 2 deletions test/core_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,23 +267,47 @@ def generate_test_ensemble(self):
ensemble.add_molecule(mol_trans)
self.assertEqual(len(ensemble.molecules), 3)

mol_trans_rot = ensemble.molecules[1].translate_molecule(e2)
mol_trans_rot = copy.deepcopy(ensemble.molecules[1].translate_molecule(e2))
ensemble.add_molecule(mol_trans_rot)
self.assertEqual(len(ensemble.molecules), 4)

mol_rot_trans = ensemble.molecules[2].rotate_molecule(e1, 90)
mol_rot_trans = copy.deepcopy(ensemble.molecules[2].rotate_molecule(e1, 90))
ensemble.add_molecule(mol_rot_trans)
self.assertEqual(len(ensemble.molecules), 5)

ensemble.add_molecule(copy.deepcopy(ensemble.molecules[4].rotate_molecule(e3, 20)))
ensemble.add_molecule(copy.deepcopy(ensemble.molecules[5].rotate_molecule(e3, 20)))
ensemble.add_molecule(copy.deepcopy(ensemble.molecules[6].rotate_molecule(e3, 20)))
ensemble.add_molecule(copy.deepcopy(ensemble.molecules[7].rotate_molecule(e3, 20)))
ensemble.add_molecule(copy.deepcopy(ensemble.molecules[4].rotate_molecule(e3, -20)))
ensemble.add_molecule(copy.deepcopy(ensemble.molecules[5].rotate_molecule(e3, -20)))
ensemble.add_molecule(copy.deepcopy(ensemble.molecules[6].rotate_molecule(e3, -20)))
ensemble.add_molecule(copy.deepcopy(ensemble.molecules[7].rotate_molecule(e3, -20)))
return ensemble

def test_align(self):
#### since all the molecules are identical, every way we do this should be totally fine
ensemble = self.generate_test_ensemble()
ensemble.align()
template = ensemble.molecules[0].geometry
for molecule in ensemble.molecules:
for i in range(0,len(template)):
self.assertTrue(cctk.helper_functions.compute_distance_between(molecule.geometry[i],template[i]) < 0.0001)

ensemble2 = self.generate_test_ensemble()
ensemble2.align(atoms="heavy")
template = ensemble2.molecules[0].geometry
for molecule in ensemble2.molecules:
for i in range(0,len(template)):
self.assertTrue(cctk.helper_functions.compute_distance_between(molecule.geometry[i],template[i]) < 0.0001)

ensemble3 = self.generate_test_ensemble()
ensemble3.align(atoms=[13, 4, 27, 6, 9, 14])
template = ensemble3.molecules[0].geometry
for molecule in ensemble3.molecules:
for i in range(0,len(template)):
self.assertTrue(cctk.helper_functions.compute_distance_between(molecule.geometry[i],template[i]) < 0.0001)


if __name__ == '__main__':
unittest.main()

0 comments on commit 31f2680

Please sign in to comment.