def test(self):
     args, metric = Cluster.parser.parse_args([
         '-p', get('points_on_cube/ProjectInfo.yaml', just_filename=True),
         '-o', self.td,
         'rmsd', '-a', get('points_on_cube/AtomIndices.dat', just_filename=True),
         'hybrid', '-k', '4'], print_banner=False)
     Cluster.main(args, metric)
示例#2
0
    def test(self):
        args, metric = Cluster.parser.parse_args([
            '-p', get('ProjectInfo.yaml', just_filename=True),
            '-s', '10',
            '-o', self.td,
            'rmsd', '-a', get('AtomIndices.dat', just_filename=True),
            'hierarchical'],
            print_banner=False)
        Cluster.main(args, metric)

        eq(load(pjoin(self.td, 'ZMatrix.h5')), get('ZMatrix.h5'))
示例#3
0
    def test(self):
        args, metric = Cluster.parser.parse_args([
            '-p', get('ProjectInfo.yaml', just_filename=True),
            '-o', self.td,
            'rmsd', '-a', get('AtomIndices.dat', just_filename=True),
            'kcenters', '-k', '100'], print_banner=False)
        Cluster.main(args, metric)

        eq(load(pjoin(self.td, 'Assignments.h5')),
           get('Assignments.h5'))
        eq(load(pjoin(self.td, 'Assignments.h5.distances')),
           get('Assignments.h5.distances'))
        eq(load(pjoin(self.td, 'Gens.lh5')),
           get('Gens.lh5'))
    def test(self):
        args, metric = Cluster.parser.parse_args([
            '-p', get('points_on_cube/ProjectInfo.yaml', just_filename=True),
            '-o', self.td,
            'rmsd', '-a', get('points_on_cube/AtomIndices.dat', just_filename=True),
            'kcenters', '-k', '4'], print_banner=False)
        Cluster.main(args, metric)

        assignments = load(pjoin(self.td, 'Assignments.h5'))["arr_0"]
        assignment_counts = np.bincount(assignments.flatten())
        eq(assignment_counts, np.array([2, 2, 2, 2]))

        distances = load(pjoin(self.td, 'Assignments.h5.distances'))["arr_0"]
        eq(distances, np.zeros((1,8)))
示例#5
0
    def test(self):
        try:
            import fastcluster
        except ImportError:
            raise nose.SkipTest("Cannot find fastcluster, so skipping hierarchical clustering test.")

        args, metric = Cluster.parser.parse_args([
            '-p', get('ProjectInfo.yaml', just_filename=True),
            '-s', '10',
            '-o', self.td,
            'rmsd', '-a', get('AtomIndices.dat', just_filename=True),
            'hierarchical'],
            print_banner=False)
        Cluster.main(args, metric)

        eq(load(pjoin(self.td, 'ZMatrix.h5')), get('ZMatrix.h5'))
    def test(self):
        if os.getenv('TRAVIS', None) == 'true':
            raise nose.SkipTest('Skipping test_Assign on TRAVIS')

        try:
            import fastcluster
        except ImportError:
            raise nose.SkipTest("Cannot find fastcluster, so skipping hierarchical clustering test.")

        args, metric = Cluster.parser.parse_args([
            '-p', get('ProjectInfo.yaml', just_filename=True),
            '-s', '10',
            '-o', self.td,
            'rmsd', '-a', get('AtomIndices.dat', just_filename=True),
            'hierarchical'],
            print_banner=False)
        Cluster.main(args, metric)

        eq(load(pjoin(self.td, 'ZMatrix.h5')), get('ZMatrix.h5'))