def test_distance2_same_landscape_position(self): atoms, residues, chains = parse_complex_from_file(self.golden_data_path + '1PPElig.pdb') ligand = Complex(chains, atoms) adapter = MJ3hAdapter(self.receptor, ligand) scoring_function = MJ3h() coordinates = Coordinates([0., 0., 0., 1., 0., 0., 0.]) landscape_position1 = DockingLandscapePosition(scoring_function, coordinates, adapter.receptor_model, adapter.ligand_model) landscape_position2 = DockingLandscapePosition(scoring_function, coordinates, adapter.receptor_model, adapter.ligand_model) assert_almost_equal(0.0, landscape_position1.distance2(landscape_position2))
def test_distance2_same_landscape_position(self): atoms, residues, chains = parse_complex_from_file(self.golden_data_path + '1PPElig.pdb') ligand = Complex(chains, atoms) adapter = MJ3hAdapter(self.receptor, ligand) scoring_function = MJ3h() coordinates = Coordinates([0., 0., 0., 1., 0., 0., 0.]) landscape_position1 = DockingLandscapePosition(scoring_function, coordinates, adapter.receptor_model, adapter.ligand_model) landscape_position2 = DockingLandscapePosition(scoring_function, coordinates, adapter.receptor_model, adapter.ligand_model) assert_almost_equal(0.0, landscape_position1.distance2(landscape_position2))
def test_distance2_minus_10A_translation_y(self): atoms, _, chains = parse_complex_from_file(self.golden_data_path / '1PPElig.pdb') ligand = Complex(chains, atoms) adapter = MJ3hAdapter(self.receptor, ligand) scoring_function = MJ3h() coordinates = Coordinates([0., 0., 0., 1., 0., 0., 0.]) landscape_position1 = DockingLandscapePosition(scoring_function, coordinates, adapter.receptor_model, adapter.ligand_model) adapter2 = MJ3hAdapter(self.receptor, ligand) adapter2.ligand_model.translate([0.0, -10.0, 0.0]) landscape_position2 = DockingLandscapePosition(scoring_function, coordinates, adapter2.receptor_model, adapter2.ligand_model) assert_almost_equal(100.0, landscape_position1.distance2(landscape_position2)) assert_almost_equal(10.0, landscape_position1.distance(landscape_position2))