Ejemplo n.º 1
0
    def testResults(self):
        ensemble = PDBENSEMBLEA[:]
        weights = ensemble.getWeights()
        weights[:, 0, :] = 0.
        ensemble.setWeights(weights)
        ensemble_trimed = trimPDBEnsemble(ensemble, occupancy=0.9)
        assert calcOccupancies(ensemble_trimed).min() > 0.9, \
                     'soft trimPDBEnsemble failed'

        ensemble_trimed2 = trimPDBEnsemble(ensemble, occupancy=0.9, hard=True)
        assert calcOccupancies(ensemble_trimed2).min() > 0.9, \
                     'hard trimPDBEnsemble failed'

        atoms = ensemble_trimed.getAtoms()
        atoms2 = ATOMS[ensemble_trimed._indices]
        assert_equal(atoms.getIndices(), atoms2.getIndices(),
                     'soft trimPDBEnsemble returns a wrong result')

        msa1 = ensemble_trimed.getMSA()
        msa2 = ensemble_trimed2.getMSA()
        assert_equal(msa1.getArray(), msa2.getArray(),
                     'soft trimPDBEnsemble returns a wrong result')
Ejemplo n.º 2
0
 def testResults(self):
     assert_equal(calcOccupancies(PDBENSEMBLE),
                  WEIGHTS.sum(0).flatten(), 'calcOccupancies failed')
Ejemplo n.º 3
0
 def testResults(self):
     assert_equal(calcOccupancies(PDBENSEMBLE), WEIGHTS.sum(0).flatten(),
                  'calcOccupancies failed')