Commit c62f2ed0 authored by jdurrant's avatar jdurrant
Browse files

Units tests now pass.

parent 79d186c6
......@@ -998,7 +998,7 @@ class FileIO():
Requires the :any:`MDAnalysis <MDAnalysis.core.AtomGroup>` library.
Should be called via the wrapper function
:meth:`~scoria.Molecule.Molecule.load_via_MDAnalysis`
:meth:`~scoria.Molecule.Molecule.load_MDAnalysis_into`
:params \*args: Filename, filenames, or list of file names. Used to
inizalize a MDAnalysis.Universe object.
......@@ -1022,7 +1022,7 @@ class FileIO():
Requires the :any:`MDAnalysis <MDAnalysis.core.AtomGroup>` library.
Should be called via the wrapper function
:meth:`~scoria.Molecule.Molecule.load_via_MDAnalysis`
:meth:`~scoria.Molecule.Molecule.load_MDAnalysis_into`
:param mdanalysis.universe universe: An MDAnalysis universe object to
import.
......
......@@ -83,9 +83,9 @@ class Test:
True
)
print(" load_via_MDAnalysis()")
print(" load_MDAnalysis_into()")
self.mol = Molecule()
self.mol.load_via_MDAnalysis(sample_structures_dir + "M2_traj.psf",
self.mol.load_MDAnalysis_into(sample_structures_dir + "M2_traj.psf",
sample_structures_dir + "M2_traj.dcd")
# Temporarily commented out because no dumbpy implementation needed.
......@@ -573,9 +573,9 @@ class FileIOBenchmarks:
def load_dcd(self):
if "MDANALYSIS" in numpy.dependencies_available:
self.molecule.load_via_MDAnalysis(self.sample_structures_dir + "single_frame.psf", self.sample_structures_dir + "single_frame.dcd")
self.molecule.load_MDAnalysis_into(self.sample_structures_dir + "single_frame.psf", self.sample_structures_dir + "single_frame.dcd")
def load_dcd_100_frames(self):
if "MDANALYSIS" in numpy.dependencies_available:
self.molecule.load_via_MDAnalysis(self.sample_structures_dir + "single_frame.psf", self.sample_structures_dir + "single_frame.100.dcd")
self.molecule.load_MDAnalysis_into(self.sample_structures_dir + "single_frame.psf", self.sample_structures_dir + "single_frame.100.dcd")
......@@ -58,7 +58,7 @@ class FileIOTests(unittest.TestCase):
self.assertEqual(self.mol.get_total_number_of_atoms(), 401)
self.assertEqual(self.mol.get_remarks(), [' This is a remark.'])
@unittest.skip("Needs multiframe pdbqt")
@unittest.skip("Needs multiframe pdbqt")
def test_load_pdbqt_trajectory_into(self):
"""
Testing the ability of the FileIO module to import pdbqt trajectories
......@@ -66,7 +66,7 @@ class FileIOTests(unittest.TestCase):
"""
self.mol.load_pdbqt_trajectory_into(self.info_path + '')
@unittest.skip("Needs multiframe pdbqt")
@unittest.skip("Needs multiframe pdbqt")
def test_load_pdbqt_trajectory_into_using_file_object(self):
"""
Testing the ability of the FileIO module to import pdbqt trajectories
......@@ -164,7 +164,6 @@ class FileIOTests(unittest.TestCase):
[' Created by DCD plugin\x00',
' \x00\x00\x00REMARKS Created 03 January, 2017 at'])
def test_load_MDAnalysis_into_using_universe_object(self):
"""
Empty test.
......
......@@ -20,7 +20,7 @@ Component_B_out = "./Component_B.pdb"
# Load in a DCD/PSF trajectory and create a contact object within it.
print("Loading Molecule... ",)
MOL = scoria.Molecule()
MOL.load_via_MDAnalysis(PSF, DCD)
MOL.load_MDAnalysis_into(PSF, DCD)
contacts = con.Contact(MOL)
print(" done")
......
......@@ -4,7 +4,7 @@ import numpy as np
# Load in a DCD/PSF trajectory.
print("Loading Molecule...")
mol = scoria.Molecule()
mol.load_via_MDAnalysis(
mol.load_MDAnalysis_into(
"../scoria/sample-files/test_sim.psf",
"../scoria/sample-files/test_sim.dcd"
)
......
import scoria
from scoria.unittests.UnitTests import UnitTests
#from scoria.Test import Test
#t= Test()
t = UnitTests()
t.run_all()
#t.test_all()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment