diff --git a/.gitignore b/.gitignore index 471a3724..e1148a85 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,19 @@ build/linux-g++-64 # test files *.as -tests/results \ No newline at end of file +tests/results + +# rdock original files +rdock-utils/scripts copy/make_grid.csh +rdock-utils/scripts copy/rbhtfinder +rdock-utils/scripts copy/run_rbdock.pl +rdock-utils/scripts copy/run_rbscreen.pl +rdock-utils/scripts copy/sdfield +rdock-utils/scripts copy/sdfilter +rdock-utils/scripts copy/sdmodify +rdock-utils/scripts copy/sdreport +rdock-utils/scripts copy/sdrmsd +rdock-utils/scripts copy/sdsort +rdock-utils/scripts copy/sdsplit +rdock-utils/scripts copy/sdtether +rdock-utils/scripts copy/to_unix diff --git a/rdock-utils/Dockerfile b/rdock-utils/Dockerfile index 24164fd9..c29a2723 100644 --- a/rdock-utils/Dockerfile +++ b/rdock-utils/Dockerfile @@ -1,5 +1,18 @@ FROM python:3.12 AS base +RUN DEBIAN_FRONTEND=noninteractive apt update -y \ + && apt install -y --no-install-recommends \ + swig \ + openbabel \ + libopenbabel-dev \ + && rm -rf /var/lib/apt/lists/* + +# this is a bit of a mess but it is a quick way to be able to +# pip install openbable, we will improve it later +RUN ln -s /usr/include/openbabel3 /usr/local/include/openbabel3 +RUN ln -s /lib/x86_64-linux-gnu/libopenbabel.so /usr/local/lib/libopenbabel.so + + COPY requirements.txt requirements.txt RUN python -m pip install --upgrade pip RUN python -m pip install -r requirements.txt diff --git a/rdock-utils/pyproject.toml b/rdock-utils/pyproject.toml index 6b9c371c..029e1d1e 100644 --- a/rdock-utils/pyproject.toml +++ b/rdock-utils/pyproject.toml @@ -1,11 +1,18 @@ [project] +dynamic = ["dependencies", "optional-dependencies"] name = "rdock-utils" version = "0.1.0" description = "Utilities for working with RDock and operating on SD files" requires-python = ">=3.10.0" +[tool.setuptools.dynamic] +dependencies = {file = ["requirements.txt"]} +optional-dependencies = { dev = {file = ["requirements-dev.txt"]} } + [project.scripts] sdfield = "rdock_utils.sdfield:main" +sdrmsd_old = "rdock_utils.sdrmsd_original:main" +sdrmsd = "rdock_utils.sdrmsd.main:main" [project.urls] Repository = "https://github.com/CBDD/rDock.git" @@ -13,7 +20,7 @@ Repository = "https://github.com/CBDD/rDock.git" [tool.ruff] line-length = 119 target-version = "py312" -exclude = [".git","__pycache__"] +exclude = [".git", "__pycache__", "rdock_utils/sdrmsd_original.py"] [tool.ruff.lint] select = ["E4", "E7", "E9", "F", "I"] @@ -54,4 +61,4 @@ no_implicit_reexport = false strict_equality = true -exclude = ['^setup\.py$'] \ No newline at end of file +exclude = ["rdock_utils/sdrmsd_original.py", "tests/"] diff --git a/rdock-utils/rdock_utils/sdnothing.py b/rdock-utils/rdock_utils/sdnothing.py deleted file mode 100644 index b2397264..00000000 --- a/rdock-utils/rdock_utils/sdnothing.py +++ /dev/null @@ -1,2 +0,0 @@ -def main() -> None: - print("to be removed when we start having code migrated over here") diff --git a/rdock-utils/rdock_utils/sdrmsd/__init__.py b/rdock-utils/rdock_utils/sdrmsd/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/rdock-utils/rdock_utils/sdrmsd/main.py b/rdock-utils/rdock_utils/sdrmsd/main.py new file mode 100644 index 00000000..1ff624a2 --- /dev/null +++ b/rdock-utils/rdock_utils/sdrmsd/main.py @@ -0,0 +1,13 @@ +from .parser import get_parser +from .sdrmsd import SDRMSD + + +def main(argv: list[str] | None = None) -> None: + parser = get_parser() + args = parser.parse_args(argv) + sdrmsd = SDRMSD(args.reference, args.input, args.out, args.fit, args.threshold) + sdrmsd.run() + + +if __name__ == "__main__": + main() diff --git a/rdock-utils/rdock_utils/sdrmsd/parser.py b/rdock-utils/rdock_utils/sdrmsd/parser.py new file mode 100644 index 00000000..287a47a7 --- /dev/null +++ b/rdock-utils/rdock_utils/sdrmsd/parser.py @@ -0,0 +1,54 @@ +import argparse + + +def get_parser() -> argparse.ArgumentParser: + parser = argparse.ArgumentParser( + prog="SDRMSD", + usage="%(prog)s [options] reference.sdf input.sdf", + description="Superpose molecules before RMSD calculation", + epilog=( + "Arguments:\n" + " reference.sdf SDF file with the reference molecule.\n" + " input.sdf SDF file with the molecules to be compared to reference.\n" + ), + ) + parser.add_argument( + "reference", + type=str, + help="Path to the SDF file with the reference molecule.", + ) + parser.add_argument( + "input", + type=str, + help="Path to the SDF file with the molecules to be compared to reference.", + ) + parser.add_argument( + "-f", + "--fit", + action="store_true", + default=False, + help="Superpose molecules before RMSD calculation", + ) + parser.add_argument( + "-t", + "--threshold", + action="store", + default=None, + type=float, + help=( + "Discard poses with RMSD < THRESHOLD with respect previous poses " + "which were not rejected based on the same principle. A Population " + "SDField will be added to output SD with the population number." + ), + ) + parser.add_argument( + "-o", + "--out", + default=None, + metavar="FILE", + help=( + "If declared, write an output SDF file with the input molecules with " + "a new sdfield . If the molecule was fitted, the fitted molecule coordinates will be saved." + ), + ) + return parser diff --git a/rdock-utils/rdock_utils/sdrmsd/sdrmsd.py b/rdock-utils/rdock_utils/sdrmsd/sdrmsd.py new file mode 100644 index 00000000..e6d02a01 --- /dev/null +++ b/rdock-utils/rdock_utils/sdrmsd/sdrmsd.py @@ -0,0 +1,148 @@ +import functools +import logging +import math + +from openbabel import pybel + +from .superpose3d import MolAlignmentData, Superpose3D +from .types import AutomorphismRMSD, CoordsArray, PoseMatchData, SDRMSDData + +logger = logging.getLogger("SDRMSD") + + +class SDRMSD: + def __init__( + self, + reference_filename: str, + input_filename: str, + output_filename: str, + fit: bool = False, + threshold: float | None = None, + ) -> None: + self.reference_filename = reference_filename + self.input_filename = input_filename + self.fit = fit + self.output_filename = output_filename + self.threshold = threshold + + def run(self) -> None: + # Find the RMSD between the crystal pose and each docked pose + docked_poses = pybel.readfile("sdf", self.input_filename) + self.display_fit_message() + data = SDRMSDData() + + # Read crystal pose + crystal_pose = self.get_crystal_pose() + crystal_atoms = len(crystal_pose.atoms) + + for i, docked_pose in enumerate(docked_poses, start=1): + atoms_number = self.process_docked_pose(docked_pose) + + if atoms_number != crystal_atoms: + data.skipped.append(i) + continue + + rmsd_result = self.calculate_rmsd(crystal_pose, docked_pose) + pose_match_data = PoseMatchData(i, docked_pose, data) + self.handle_pose_matching(rmsd_result, pose_match_data) + + if self.output_filename: + self.process_and_save_selected_molecules(data) + + if data.skipped: + logger.warning(f"SKIPPED input molecules due to the number of atom mismatch: {data.skipped}") + + def get_automorphism_rmsd(self, target: pybel.Molecule, molecule: pybel.Molecule) -> AutomorphismRMSD: + superposer = Superpose3D(MolAlignmentData(molecule), MolAlignmentData(target)) + result = superposer.automorphism_rmsd(self.fit) + return result + + def update_coordinates(self, obmol: pybel.Molecule, new_coordinates: CoordsArray) -> None: + for i, atom in enumerate(obmol): + atom.OBAtom.SetVector(*new_coordinates[i]) + + def get_best_matching_pose(self, pose_match_data: PoseMatchData) -> tuple[int | None, float]: + threshold = self.threshold or math.inf + docked_pose = pose_match_data.docked_pose + molecules_dict = pose_match_data.sdrmsd_data.molecules_dict + get_rmsd = functools.partial(self.get_automorphism_rmsd, target=docked_pose) + poses_rmsd = ((index, get_rmsd(molecule)[0]) for index, molecule in molecules_dict.items()) + filtered_by_threshold = (t for t in poses_rmsd if t[1] < threshold) + return min(filtered_by_threshold, key=lambda t: t[1], default=(None, math.inf)) + + def process_and_save_selected_molecules(self, data: SDRMSDData) -> None: + with pybel.Outputfile("sdf", self.output_filename, overwrite=True) as output_sdf: + for i in sorted(data.out_dict.keys()): + molecule, rmsd_result = data.out_dict[i] + # Get the number of matches in the thresholding operation + population_value = data.population.get(i, 1) + self.save_molecule_with_rmsd(output_sdf, molecule, rmsd_result, population_value) + + def save_molecule_with_rmsd( + self, output_sdf: pybel.Outputfile, molecule: pybel.Molecule, rmsd: float, population_value: int + ) -> None: + new_data = pybel.ob.OBPairData() + new_data.SetAttribute("RMSD") + new_data.SetValue(f"{rmsd:.3f}") + + if self.threshold: + pop_data = pybel.ob.OBPairData() + pop_data.SetAttribute("Population") + pop_data.SetValue(f"{population_value}") + molecule.OBMol.CloneData(pop_data) + + molecule.OBMol.CloneData(new_data) + output_sdf.write(molecule) + + def get_crystal_pose(self) -> pybel.Molecule: + crystal_pose = next(pybel.readfile("sdf", self.reference_filename)) + crystal_pose.removeh() + return crystal_pose + + def display_fit_message(self) -> None: + message = "FIT" if self.fit else "NOFIT" + print(f"POSE\tRMSD_{message}") + + def process_docked_pose(self, docked_pose: pybel.Molecule) -> int: + docked_pose.removeh() + return len(docked_pose.atoms) + + def calculate_rmsd(self, crystal: pybel.Molecule, docked_pose: pybel.Molecule) -> float: + rmsd, fitted_coords = self.get_automorphism_rmsd(crystal, docked_pose) + + if self.fit: + if fitted_coords is not None: + self.update_coordinates(docked_pose, fitted_coords) + else: + logger.warning("Automorphism failed. skipping alignment") + + return rmsd + + def handle_pose_matching(self, rmsd: float, pose_match_data: PoseMatchData) -> None: + if self.threshold: + match_pose, best_match_value = self.get_best_matching_pose(pose_match_data) + if match_pose is not None: + self.print_matching_info(pose_match_data, match_pose, best_match_value) + else: + self.save_and_print_info(rmsd, pose_match_data) + else: + self.save_and_print_info(rmsd, pose_match_data) + + def print_matching_info(self, pose_match_data: PoseMatchData, match_pose: int, best_match_value: float) -> None: + index = pose_match_data.pose_index + population = pose_match_data.sdrmsd_data.population + logger.info(f"Pose {index} matches pose {match_pose} with {best_match_value:.3f} RMSD") + population[match_pose] += 1 + + def save_and_print_info(self, rmsd: float, pose_match_data: PoseMatchData) -> None: + index = pose_match_data.pose_index + docked_pose = pose_match_data.docked_pose + out_dict = pose_match_data.sdrmsd_data.out_dict + molecules_dict = pose_match_data.sdrmsd_data.molecules_dict + population = pose_match_data.sdrmsd_data.population + + if self.output_filename: + out_dict[index] = (docked_pose, rmsd) + print(f"{index}\t{rmsd:.2f}") + molecules_dict[index] = docked_pose + population[index] = 1 diff --git a/rdock-utils/rdock_utils/sdrmsd/superpose3d.py b/rdock-utils/rdock_utils/sdrmsd/superpose3d.py new file mode 100644 index 00000000..341cbea5 --- /dev/null +++ b/rdock-utils/rdock_utils/sdrmsd/superpose3d.py @@ -0,0 +1,150 @@ +import functools +import logging +import math +from dataclasses import dataclass + +import numpy +from numpy.linalg import LinAlgError +from numpy.linalg.linalg import SVDResult +from openbabel import pybel + +from .types import AutomorphismRMSD, BoolArray, Coordinate, CoordsArray, FloatArray, Superpose3DResult, Vector3D + +logger = logging.getLogger("Superpose3D") + + +@dataclass +class MolAlignmentData: + molecule: pybel.Molecule + mask: BoolArray | None = None + weights: FloatArray | float = 1.0 + + @functools.lru_cache(1) + def get_mask(self) -> BoolArray: + return self.mask if self.mask is not None else numpy.ones(len(self.coords()), "bool") + + @functools.lru_cache(2) + def coords(self, use_mask: bool = False) -> CoordsArray: + if not use_mask: + return numpy.array([atom.coords for atom in self.molecule]) + return self.coords()[self.get_mask()] + + @functools.lru_cache(2) + def centroid(self, use_mask: bool = False) -> Vector3D: + return numpy.mean(self.coords(use_mask) * self.weights, axis=0) # type: ignore + + @functools.lru_cache(2) + def centered_coords(self, use_mask: bool = False, mask_centroid: bool = False) -> CoordsArray: + return self.coords(use_mask) - self.centroid(mask_centroid) + + def __hash__(self) -> int: + return self.molecule.__hash__() # type: ignore + + +class Superpose3D: + def __init__(self, target: MolAlignmentData, source: MolAlignmentData) -> None: + self.target = target + self.source = source + + def superpose_3D(self) -> Superpose3DResult: + # The following steps come from: + # - http://www.pymolwiki.org/index.php/OptAlign#The_Code + # - http://en.wikipedia.org/wiki/Kabsch_algorithm + centered_target = self.target.centered_coords(mask_centroid=True) + centered_source = self.source.centered_coords(mask_centroid=True) + result = self.perform_svd(centered_source, centered_target) + + if result is None: + logger.warning("Couldn't perform the Single Value Decomposition, skipping alignment") + return (self.source.coords(), 0, numpy.identity(3)) + + # check for reflections and then produce the rotation. + # V and Wt are orthonormal, so their det's are +/-1. + V, S, Wt = result + reflect = numpy.linalg.det(V) * numpy.linalg.det(Wt) + + if reflect == -1.0: + S[-1] = -S[-1] + V[:, -1] = -V[:, -1] + + source_residual = numpy.sum(numpy.sum(centered_source * centered_source * self.source.weights, axis=0), axis=0) + target_residual = numpy.sum(numpy.sum(centered_target * centered_target * self.target.weights, axis=0), axis=0) + E0 = source_residual + target_residual + aux_rmsd = E0 - (2.0 * sum(S)) + rmsd = numpy.sqrt(abs(aux_rmsd / len(self.source.coords(use_mask=True)))) + + # rotate and translate the molecule + rotation_matrix = numpy.dot(V, Wt) + + new_coords = numpy.dot((self.source.centered_coords()), rotation_matrix) + self.target.centroid() + return (new_coords, rmsd, rotation_matrix) + + def perform_svd(self, centered_source: CoordsArray, centered_target: CoordsArray) -> SVDResult | None: + weights_values = [self.target.weights, 1.0] + + for weight in weights_values: + try: + dot_product = numpy.dot(numpy.transpose(centered_source), centered_target * weight) + svd_result: SVDResult | None = numpy.linalg.svd(dot_product) + return svd_result + + except LinAlgError as e: + logger.exception(e) + + return None + + def map_to_crystal(self) -> tuple[tuple[int, int], ...]: + """ + Some docking programs might alter the order of the atoms in the output (like Autodock Vina does...) + this will mess up the rmsd calculation with OpenBabel. + """ + query = pybel.ob.CompileMoleculeQuery(self.target.molecule.OBMol) + mapper = pybel.ob.OBIsomorphismMapper.GetInstance(query) + mapping_pose = pybel.ob.vvpairUIntUInt() + mapper.MapUnique(self.source.molecule.OBMol, mapping_pose) + result: tuple[tuple[int, int], ...] = mapping_pose[0] + return result + + def get_pose_rmsd( + self, fit: bool, pose_coordinates: CoordsArray, mapping: tuple[tuple[int, int], ...] + ) -> AutomorphismRMSD: + target_coords = self.target.coords() + automorph_coords = [target_coords[j] for _, j in sorted(mapping)] + rmsd = self.rmsd(pose_coordinates, automorph_coords) + fitted_pose = None + + if fit: + superpose_result = self.superpose_3D() + fitted_pose, fitted_rmsd, _ = superpose_result + rmsd = min(fitted_rmsd, rmsd) + + return (rmsd, fitted_pose) + + def automorphism_rmsd(self, fit: bool) -> AutomorphismRMSD: + mappings = pybel.ob.vvpairUIntUInt() + raw_mappose = self.map_to_crystal() + pybel.ob.FindAutomorphisms(self.target.molecule.OBMol, mappings) + mappose = numpy.array(raw_mappose) + sorted_indices = numpy.argsort(mappose[:, 0]) + mappose_result = mappose[sorted_indices][:, 1] + pose_coordinates = numpy.array(self.source.coords())[mappose_result] + return min( + (self.get_pose_rmsd(fit, pose_coordinates, mapping) for mapping in mappings), + key=lambda t: t[0], + default=(math.inf, None), + ) + + def rmsd(self, all_coordinates_1: CoordsArray, all_coordinates_2: list[Coordinate]) -> float: + """ + Find the root mean square deviation between two lists of 3-tuples. + """ + deviation = sum( + self.squared_distance(atom_1, atom_2) for atom_1, atom_2 in zip(all_coordinates_1, all_coordinates_2) + ) + return math.sqrt(deviation / len(all_coordinates_1)) + + def squared_distance(self, coordinates_1: Coordinate, coordinates_2: Coordinate) -> float: + """ + Find the squared distance between two 3-tuples. + """ + return sum((a - b) ** 2 for a, b in zip(coordinates_1, coordinates_2)) diff --git a/rdock-utils/rdock_utils/sdrmsd/types.py b/rdock-utils/rdock_utils/sdrmsd/types.py new file mode 100644 index 00000000..bfb2f666 --- /dev/null +++ b/rdock-utils/rdock_utils/sdrmsd/types.py @@ -0,0 +1,43 @@ +from dataclasses import dataclass, field +from typing import Any + +# from typing import Literal +import numpy +from openbabel import pybel + +Coordinate = tuple[float, float, float] +FloatArray = numpy.ndarray[Any, numpy.dtype[numpy.float64]] +BoolArray = numpy.ndarray[Any, numpy.dtype[numpy.bool_]] +CoordsArray = numpy.ndarray[Any, numpy.dtype[numpy.float64]] +AutomorphismRMSD = tuple[float, CoordsArray | None] +Vector3D = numpy.ndarray[Any, numpy.dtype[numpy.float64]] +Matrix3x3 = numpy.ndarray[Any, numpy.dtype[numpy.float64]] +SingularValueDecomposition = tuple[Matrix3x3, Vector3D, Matrix3x3] +Superpose3DResult = tuple[CoordsArray, float, Matrix3x3] + +## Shape support for type hinting is not yet avaialable in numpy +## let's keep this as a guide for numpy 2.0 release +# Coordinate = tuple[float, float, float] +# FloatArray = numpy.ndarray[Literal["N"], numpy.dtype[float]] +# BoolArray = numpy.ndarray[Literal["N"], numpy.dtype[bool]] +# CoordsArray = numpy.ndarray[Literal["N", 3], numpy.dtype[float]] +# AutomorphismRMSD = tuple[float, CoordsArray | None] +# Vector3D = numpy.ndarray[Literal[3], numpy.dtype[float]] +# Matrix3x3 = numpy.ndarray[Literal[3, 3], numpy.dtype[float]] +# SingularValueDecomposition = tuple[Matrix3x3, Vector3D, Matrix3x3] +# Superpose3DResult = tuple[CoordsArray, float, Matrix3x3] + + +@dataclass +class SDRMSDData: + skipped: list[int] = field(default_factory=list) + molecules_dict: dict[int, pybel.Molecule] = field(default_factory=dict) # Save all poses with their dockid + population: dict[int, int] = field(default_factory=dict) # Poses to be written + out_dict: dict[int, tuple[pybel.Molecule, float]] = field(default_factory=dict) + + +@dataclass +class PoseMatchData: + pose_index: int + docked_pose: pybel.Molecule + sdrmsd_data: SDRMSDData diff --git a/rdock-utils/rdock_utils/sdrmsd_original.py b/rdock-utils/rdock_utils/sdrmsd_original.py new file mode 100644 index 00000000..cbae0415 --- /dev/null +++ b/rdock-utils/rdock_utils/sdrmsd_original.py @@ -0,0 +1,317 @@ +#! /usr/bin/env python +# +# Calculate SMART RMSD with or without molecular superposition (FIT or NOFIT) +# Script distributed under GNU LGPL 3.0 along rDock software. +# +# This algorithm takes into account molecular automorphism. That is, it identifies +# molecules which are the same but might have atom orders changed and still be able to +# match the pairs and correctly calculate the RMSD. +# +# Author: Daniel Alvarez-Garcia +# Date: 08-11-2013 + +import math +import optparse +import os +import sys + +import numpy as npy +from openbabel import pybel + + +def superpose3D( + ref, target: float, weights: list[float] | None = None, refmask=None, targetmask=None, returnRotMat=False +): + """superpose3D performs 3d superposition using a weighted Kabsch algorithm : http://dx.doi.org/10.1107%2FS0567739476001873 & doi: 10.1529/biophysj.105.066654 + definition : superpose3D(ref, target, weights,refmask,targetmask) + @parameter 1 : ref - xyz coordinates of the reference structure (the ligand for instance) + @type 1 : float64 numpy array (nx3) + --- + @parameter 2 : target - theoretical target positions to which we should move (does not need to be physically relevant. + @type 2 : float 64 numpy array (nx3) + --- + @parameter 3: weights - numpy array of atom weights (usuallly between 0 and 1) + @type 3 : float 64 numpy array (n) + @parameter 4: mask - a numpy boolean mask for designating atoms to include + Note ref and target positions must have the same dimensions -> n*3 numpy arrays where n is the number of points (or atoms) + Returns a set of new coordinates, aligned to the target state as well as the rmsd + """ + if weights is None: + weights = 1.0 + if refmask is None: + refmask = npy.ones(len(ref), "bool") + if targetmask is None: + targetmask = npy.ones(len(target), "bool") + # first get the centroid of both states + ref_centroid = npy.mean(ref[refmask] * weights, axis=0) + # print ref_centroid + refCenteredCoords = ref - ref_centroid + # print refCenteredCoords + target_centroid = npy.mean(target[targetmask] * weights, axis=0) + targetCenteredCoords = target - target_centroid + # print targetCenteredCoords + # the following steps come from : http://www.pymolwiki.org/index.php/OptAlign#The_Code and http://en.wikipedia.org/wiki/Kabsch_algorithm + # Initial residual, see Kabsch. + E0 = npy.sum(npy.sum(refCenteredCoords[refmask] * refCenteredCoords[refmask] * weights, axis=0), axis=0) + npy.sum( + npy.sum(targetCenteredCoords[targetmask] * targetCenteredCoords[targetmask] * weights, axis=0), axis=0 + ) + reftmp = npy.copy(refCenteredCoords[refmask]) + targettmp = npy.copy(targetCenteredCoords[targetmask]) + # print refCenteredCoords[refmask] + # single value decomposition of the dotProduct of both position vectors + try: + dotProd = npy.dot(npy.transpose(reftmp), targettmp * weights) + V, S, Wt = npy.linalg.svd(dotProd) + except Exception: + try: + dotProd = npy.dot(npy.transpose(reftmp), targettmp) + V, S, Wt = npy.linalg.svd(dotProd) + except Exception: + print("Couldn't perform the Single Value Decomposition, skipping alignment", file=sys.stderr) + return ref, 0 + # we already have our solution, in the results from SVD. + # we just need to check for reflections and then produce + # the rotation. V and Wt are orthonormal, so their det's + # are +/-1. + reflect = float(str(float(npy.linalg.det(V) * npy.linalg.det(Wt)))) + if reflect == -1.0: + S[-1] = -S[-1] + V[:, -1] = -V[:, -1] + rmsd = E0 - (2.0 * sum(S)) + rmsd = npy.sqrt(abs(rmsd / len(ref[refmask]))) # get the rmsd + # U is simply V*Wt + U = npy.dot(V, Wt) # get the rotation matrix + # rotate and translate the molecule + new_coords = npy.dot((refCenteredCoords), U) + target_centroid # translate & rotate + # new_coords=(refCenteredCoords + target_centroid) + # print U + if returnRotMat: + return new_coords, rmsd, U + return new_coords, rmsd + + +def squared_distance(coordsA, coordsB): + """Find the squared distance between two 3-tuples""" + sqrdist = sum((a - b) ** 2 for a, b in zip(coordsA, coordsB)) + return sqrdist + + +def rmsd(allcoordsA, allcoordsB): + """Find the RMSD between two lists of 3-tuples""" + deviation = sum(squared_distance(atomA, atomB) for (atomA, atomB) in zip(allcoordsA, allcoordsB)) + return math.sqrt(deviation / float(len(allcoordsA))) + + +def mapToCrystal(xtal, pose): + """Some docking programs might alter the order of the atoms in the output (like Autodock Vina does...) + this will mess up the rmsd calculation with OpenBabel""" + query = pybel.ob.CompileMoleculeQuery(xtal.OBMol) + mapper = pybel.ob.OBIsomorphismMapper.GetInstance(query) + mappingpose = pybel.ob.vvpairUIntUInt() + exit = mapper.MapUnique(pose.OBMol, mappingpose) + return mappingpose[0] + + +def parseArguments(argv: list[str] | None = None): + optparse.OptionParser.format_epilog = lambda self, formatter: self.epilog + epilog = """Args: + reference.sdf SDF file with the reference molecule. + input.sdf SDF file with the molecules to be compared to reference.\n""" + parser = optparse.OptionParser("usage: %prog [options] reference.sdf input.sdf", epilog=epilog) + parser.add_option( + "-f", + "--fit", + dest="fit", + action="store_true", + default=False, + help="Superpose molecules before RMSD calculation", + ) + parser.add_option( + "--threshold", + "-t", + dest="threshold", + action="store", + nargs=1, + help="Discard poses with RMSD < THRESHOLD with respect previous poses which where not rejected based on same principle. A Population SDField will be added to output SD with the population number.", + type=float, + ) + parser.add_option( + "-o", + "--out", + dest="outfilename", + metavar="FILE", + default=False, + help="If declared, write an output SDF file with the input molecules with a new sdfield . If molecule was fitted, the fitted molecule coordinates will be saved.", + ) + (options, args) = parser.parse_args(argv) + + # Check we have two arguments + if len(args) < 2: + parser.error("Incorrect number of arguments. Use -h or --help options to print help.") + + return options, args + + +def updateCoords(obmol, newcoords): + "Update OBMol coordinates. newcoords is a numpy array" + for i, atom in enumerate(obmol): + atom.OBAtom.SetVector(*newcoords[i]) + + +def getAutomorphRMSD(target, molec, fit=False): + """ + Use Automorphism to reorder target coordinates to match ref coordinates atom order + for correct RMSD comparison. Only the lowest RMSD will be returned. + + Returns: + If fit=False: bestRMSD (float) RMSD of the best matching mapping. + If fit=True: (bestRMSD, molecCoordinates) (float, npy.array) RMSD of best match and its molecule fitted coordinates. + """ + mappings = pybel.ob.vvpairUIntUInt() + bitvec = pybel.ob.OBBitVec() + lookup = [] + for i, atom in enumerate(target): + lookup.append(i) + success = pybel.ob.FindAutomorphisms(target.OBMol, mappings) + targetcoords = [atom.coords for atom in target] + mappose = npy.array(mapToCrystal(target, molec)) + mappose = mappose[npy.argsort(mappose[:, 0])][:, 1] + posecoords = npy.array([atom.coords for atom in molec])[mappose] + resultrmsd = 999999999999 + for mapping in mappings: + automorph_coords = [None] * len(targetcoords) + for x, y in mapping: + automorph_coords[lookup.index(x)] = targetcoords[lookup.index(y)] + mapping_rmsd = rmsd(posecoords, automorph_coords) + if mapping_rmsd < resultrmsd: + resultrmsd = mapping_rmsd + fitted_result = False + if fit: + fitted_pose, fitted_rmsd = superpose3D(npy.array(automorph_coords), npy.array(posecoords)) + if fitted_rmsd < resultrmsd: + resultrmsd = fitted_rmsd + fitted_result = fitted_pose + + if fit: + return (resultrmsd, fitted_pose) + else: + return resultrmsd + + +def saveMolecWithRMSD(outsdf, molec, rmsd, population=False): + newData = pybel.ob.OBPairData() + newData.SetAttribute("RMSD") + newData.SetValue("%.3f" % rmsd) + + if population: + popData = pybel.ob.OBPairData() + popData.SetAttribute("Population") + popData.SetValue("%i" % population) + molec.OBMol.CloneData(popData) + + molec.OBMol.CloneData(newData) # Add new data + outsdf.write(molec) + + +def main(argv: list[str] | None = None): + (opts, args) = parseArguments(argv) + + xtal = args[0] + poses = args[1] + + if not os.path.exists(xtal) or not os.path.exists(poses): + sys.exit("Input files not found. Please check the path given is correct.") + + fit = opts.fit + outfname = opts.outfilename + threshold = opts.threshold + + # Read crystal pose + crystal = next(pybel.readfile("sdf", xtal)) + crystal.removeh() + crystalnumatoms = len(crystal.atoms) + + # If outfname is defined, prepare an output SDF sink to write molecules + if outfname: + outsdf = pybel.Outputfile("sdf", outfname, overwrite=True) + + # Find the RMSD between the crystal pose and each docked pose + dockedposes = pybel.readfile("sdf", poses) + if fit: + print("POSE\tRMSD_FIT") + else: + print("POSE\tRMSD_NOFIT") + skipped = [] + moleclist = {} # Save all poses with their dockid + population = {} # Poses to be written + outlist = {} + for docki, dockedpose in enumerate(dockedposes): + dockedpose.removeh() + natoms = len(dockedpose.atoms) + if natoms != crystalnumatoms: + skipped.append(docki + 1) + continue + if fit: + resultrmsd, fitted_result = getAutomorphRMSD(crystal, dockedpose, fit=True) + updateCoords(dockedpose, fitted_result) + else: + resultrmsd = getAutomorphRMSD(crystal, dockedpose, fit=False) + + if threshold: + # Calculate RMSD between all previous poses + # Discard if rmsd < FILTER threshold + if moleclist: + match = None + bestmatchrmsd = 999999 + for did, prevmol in moleclist.iteritems(): + tmprmsd = getAutomorphRMSD(prevmol, dockedpose) + if tmprmsd < threshold: + if tmprmsd < bestmatchrmsd: + bestmatchrmsd = tmprmsd + match = did + + if match != None: + # Do not write this one + # sum one up to the matching previous molecule id + print( + "Pose %i matches pose %i with %.3f RMSD" % (docki + 1, match + 1, bestmatchrmsd), + file=sys.stderr, + ) + population[match] += 1 + else: + # There's no match. Print info for this one and write to outsdf if needed + # Save this one! + if outfname: + outlist[docki] = (dockedpose, resultrmsd) + print("%d\t%.2f" % ((docki + 1), resultrmsd)) + moleclist[docki] = dockedpose + population[docki] = 1 + else: + # First molecule in list. Append for sure + moleclist[docki] = dockedpose + population[docki] = 1 + if outfname: + outlist[docki] = (dockedpose, resultrmsd) + else: + # Just write best rmsd found and the molecule to outsdf if demanded + if outfname: + saveMolecWithRMSD(outsdf, dockedpose, resultrmsd) + print("%d\t%.2f" % ((docki + 1), resultrmsd)) + + if outlist: + # Threshold applied and outlist need to be written + for docki in sorted(outlist.iterkeys()): + molrmsd = outlist[docki] + # Get number of matchs in thresholding operation + pop = population.get(docki) + if not pop: + pop = 1 + # Save molecule + saveMolecWithRMSD(outsdf, molrmsd[0], molrmsd[1], pop) + + if skipped: + print("SKIPPED input molecules due to number of atom missmatch: %s" % skipped, file=sys.stderr) + + +if __name__ == "__main__": + main() diff --git a/rdock-utils/requirements-dev.txt b/rdock-utils/requirements-dev.txt index df987440..16263576 100644 --- a/rdock-utils/requirements-dev.txt +++ b/rdock-utils/requirements-dev.txt @@ -1,3 +1,3 @@ -ruff -mypy -pytest +mypy==1.8.0 +pytest==7.4.4 +ruff==0.1.14 diff --git a/rdock-utils/requirements.txt b/rdock-utils/requirements.txt index e69de29b..a113d2c3 100644 --- a/rdock-utils/requirements.txt +++ b/rdock-utils/requirements.txt @@ -0,0 +1,2 @@ +numpy==1.26.2 +openbabel==3.1.1.1 \ No newline at end of file diff --git a/rdock-utils/tests/conftest.py b/rdock-utils/tests/conftest.py index e69de29b..a0ff084f 100644 --- a/rdock-utils/tests/conftest.py +++ b/rdock-utils/tests/conftest.py @@ -0,0 +1,3 @@ +from pathlib import Path + +FIXTURES_FOLDER = Path(__file__).parent / "fixtures" diff --git a/rdock-utils/tests/fixtures/sdrmsd/aligned-fit.sdf b/rdock-utils/tests/fixtures/sdrmsd/aligned-fit.sdf new file mode 100644 index 00000000..7d0c4c2f --- /dev/null +++ b/rdock-utils/tests/fixtures/sdrmsd/aligned-fit.sdf @@ -0,0 +1,1025 @@ +L_1YET + OpenBabel01132416383D +libRbt.so/2021.1/901 2021/07/19 + 40 41 0 0 0 0 0 0 0 0999 V2000 + 38.1989 10.1357 20.2072 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.5670 12.9485 24.0376 O 0 0 0 0 0 0 0 0 0 0 0 0 + 31.3419 11.3089 24.1011 O 0 0 0 0 0 0 0 0 0 0 0 0 + 30.0189 10.7150 25.8831 O 0 0 0 0 0 0 0 0 0 0 0 0 + 32.7595 5.4724 28.0373 O 0 0 0 0 0 0 0 0 0 0 0 0 + 35.3654 6.6351 28.5658 O 0 0 0 0 0 0 0 0 0 0 0 0 + 34.1874 4.4213 23.7553 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.1689 5.5516 21.4986 O 0 0 0 0 0 0 0 0 0 0 0 0 + 38.0068 7.1500 22.8426 O 0 0 0 0 0 0 0 0 0 0 0 0 + 37.0228 8.2570 20.6648 N 0 0 0 0 0 0 0 0 0 0 0 0 + 29.1427 11.3996 23.9130 N 0 0 0 0 0 0 0 0 0 0 0 0 + 37.6027 9.4907 21.0357 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.5339 9.9127 22.4717 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3226 10.1314 23.0466 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.1043 10.5457 24.4293 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.9879 11.1294 24.9126 C 0 0 0 0 0 0 0 0 0 0 0 0 + 33.7464 11.4822 24.1713 C 0 0 1 0 0 0 0 0 0 0 0 0 + 32.4313 10.9106 24.8664 C 0 0 2 0 0 0 0 0 0 0 0 0 + 32.4273 9.2814 24.9964 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.2983 8.7060 26.1819 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.2213 7.2448 26.5116 C 0 0 1 0 0 0 0 0 0 0 0 0 + 33.1056 6.8370 27.7008 C 0 0 2 0 0 0 0 0 0 0 0 0 + 34.5977 6.9558 27.3862 C 0 0 2 0 0 0 0 0 0 0 0 0 + 35.0687 6.0023 26.2918 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.5615 6.1109 25.8971 C 0 0 1 0 0 0 0 0 0 0 0 0 + 36.9188 5.2901 24.6103 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.1748 5.7700 23.3983 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.9517 5.3938 23.0097 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.2939 5.9341 21.8051 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.9930 6.9311 20.9891 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.2162 7.3355 21.3268 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.8748 6.7736 22.5468 C 0 0 0 0 0 0 0 0 0 0 0 0 + 38.8504 10.0931 23.1607 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.7212 13.3826 22.9140 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.1468 11.1026 24.7459 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.5325 8.5052 23.6819 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.7392 6.9438 26.8261 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.2803 7.6605 29.6045 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.9518 7.5546 25.7666 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.5278 3.0335 23.8916 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1 12 2 0 0 0 0 + 2 34 1 0 0 0 0 + 3 35 1 0 0 0 0 + 4 35 2 0 0 0 0 + 6 38 1 0 0 0 0 + 7 28 1 0 0 0 0 + 7 40 1 0 0 0 0 + 8 29 2 0 0 0 0 + 9 32 2 0 0 0 0 + 10 12 1 0 0 0 0 + 10 31 1 0 0 0 0 + 11 35 1 0 0 0 0 + 12 13 1 0 0 0 0 + 13 14 2 0 0 0 0 + 13 33 1 0 0 0 0 + 14 15 1 0 0 0 0 + 15 16 2 0 0 0 0 + 16 17 1 0 0 0 0 + 17 2 1 1 0 0 0 + 17 18 1 0 0 0 0 + 18 3 1 6 0 0 0 + 18 19 1 0 0 0 0 + 19 20 2 0 0 0 0 + 19 36 1 0 0 0 0 + 20 21 1 0 0 0 0 + 21 22 1 0 0 0 0 + 21 37 1 1 0 0 0 + 22 5 1 6 0 0 0 + 22 23 1 0 0 0 0 + 23 6 1 1 0 0 0 + 23 24 1 0 0 0 0 + 24 25 1 0 0 0 0 + 25 26 1 0 0 0 0 + 25 39 1 6 0 0 0 + 26 27 1 0 0 0 0 + 27 28 2 0 0 0 0 + 27 32 1 0 0 0 0 + 28 29 1 0 0 0 0 + 29 30 1 0 0 0 0 + 30 31 2 0 0 0 0 + 31 32 1 0 0 0 0 +M END +> +64.12540954,-57.65322675,53.34742205,-57.14100212,-176.35502015,-68.63555890 + +> +156.53968631,-167.77671564,5.21130411,-176.44975611,-71.16602861,-66.94133215 +34.45104295,8.26640344,24.33299797,-0.16161449,0.65294462,-0.57169818 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-44.8298 + +> +-23.9918 + +> +1 + +> +-2.0203 + +> +0 + +> +5 + +> +-27.5227 + +> +-0.599794 + +> +-10.2712 + +> +-7.26837 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-6.63705 + +> +7.09596 + +> +-0.256781 + +> +0 + +> +0 + +> +0 + +> +-10.5668 + +> +0 + +> +0.627995 + +> +-2.86952 + +> +-1.12445 + +> +-0.26417 + +> +40 + +> +-1.12075 + +> +0.000 + +$$$$ +L_1YET + OpenBabel01132416383D +libRbt.so/2021.1/901 2021/07/19 + 40 41 0 0 0 0 0 0 0 0999 V2000 + 36.8230 6.0099 18.0165 O 0 0 0 0 0 0 0 0 0 0 0 0 + 35.5552 1.2752 22.4902 O 0 0 0 0 0 0 0 0 0 0 0 0 + 36.8089 1.9300 24.8656 O 0 0 0 0 0 0 0 0 0 0 0 0 + 36.0173 1.7926 27.0181 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.3908 7.4366 27.9577 O 0 0 0 0 0 0 0 0 0 0 0 0 + 31.4928 7.3052 25.7663 O 0 0 0 0 0 0 0 0 0 0 0 0 + 36.4581 9.3790 25.0771 O 0 0 0 0 0 0 0 0 0 0 0 0 + 38.7744 8.1808 24.2984 O 0 0 0 0 0 0 0 0 0 0 0 0 + 35.0040 8.4152 20.6247 O 0 0 0 0 0 0 0 0 0 0 0 0 + 37.2381 7.2435 19.8680 N 0 0 0 0 0 0 0 0 0 0 0 0 + 38.0675 1.0293 26.4420 N 0 0 0 0 0 0 0 0 0 0 0 0 + 36.4876 6.2924 19.1415 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.2444 5.7330 19.7633 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.3374 5.0132 20.9117 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.2160 4.4095 21.6253 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.2979 3.3994 22.5163 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.5178 2.6779 22.9709 C 0 0 1 0 0 0 0 0 0 0 0 0 + 35.6503 2.6330 24.5583 C 0 0 2 0 0 0 0 0 0 0 0 0 + 35.7270 4.1161 25.2407 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.8426 4.4761 26.1580 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.7659 5.7568 26.9349 C 0 0 1 0 0 0 0 0 0 0 0 0 + 33.3487 6.3478 27.0049 C 0 0 2 0 0 0 0 0 0 0 0 0 + 32.8529 6.8378 25.6435 C 0 0 2 0 0 0 0 0 0 0 0 0 + 33.6617 8.0041 25.0829 C 0 0 0 0 0 0 0 0 0 0 0 0 + 33.2352 8.5119 23.6842 C 0 0 1 0 0 0 0 0 0 0 0 0 + 34.2508 9.5325 23.0644 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.6086 8.9310 22.8468 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.6005 8.8510 23.7403 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.9016 8.2259 23.4370 C 0 0 0 0 0 0 0 0 0 0 0 0 + 38.1343 7.6578 22.1059 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.1828 7.7170 21.1759 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.8705 8.3606 21.4946 C 0 0 0 0 0 0 0 0 0 0 0 0 + 33.9707 5.9981 19.0232 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.8938 0.6681 22.4136 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.8824 1.5999 26.1969 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.8883 5.0026 24.7856 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.2776 5.4381 28.3572 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.5291 6.2252 25.9723 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.9855 7.3463 22.7717 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3283 10.7705 25.4047 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1 12 2 0 0 0 0 + 2 34 1 0 0 0 0 + 3 35 1 0 0 0 0 + 4 35 2 0 0 0 0 + 6 38 1 0 0 0 0 + 7 28 1 0 0 0 0 + 7 40 1 0 0 0 0 + 8 29 2 0 0 0 0 + 9 32 2 0 0 0 0 + 10 12 1 0 0 0 0 + 10 31 1 0 0 0 0 + 11 35 1 0 0 0 0 + 12 13 1 0 0 0 0 + 13 14 2 0 0 0 0 + 13 33 1 0 0 0 0 + 14 15 1 0 0 0 0 + 15 16 2 0 0 0 0 + 16 17 1 0 0 0 0 + 17 2 1 1 0 0 0 + 17 18 1 0 0 0 0 + 18 3 1 6 0 0 0 + 18 19 1 0 0 0 0 + 19 20 2 0 0 0 0 + 19 36 1 0 0 0 0 + 20 21 1 0 0 0 0 + 21 22 1 0 0 0 0 + 21 37 1 1 0 0 0 + 22 5 1 1 0 0 0 + 22 23 1 0 0 0 0 + 23 6 1 1 0 0 0 + 23 24 1 0 0 0 0 + 24 25 1 0 0 0 0 + 25 26 1 0 0 0 0 + 25 39 1 6 0 0 0 + 26 27 1 0 0 0 0 + 27 28 2 0 0 0 0 + 27 32 1 0 0 0 0 + 28 29 1 0 0 0 0 + 29 30 1 0 0 0 0 + 30 31 2 0 0 0 0 + 31 32 1 0 0 0 0 +M END +> +62.20781910,64.30415179,-178.11010172,-58.10081097,7.54113525,-68.17322223 + +> +67.48601327,-169.27579335,2.88060764,-176.09387410,-63.63147672,120.70739357 +35.39014364,5.88426981,23.71740651,-1.24154136,-1.19338794,2.37044843 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-26.0347 + +> +-6.22447 + +> +1 + +> +-0.587536 + +> +0.254651 + +> +5 + +> +-15.9001 + +> +-0.155612 + +> +-12.0806 + +> +-10.6731 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-6.74403 + +> +7.09596 + +> +-0.302015 + +> +0 + +> +0 + +> +0 + +> +-7.72963 + +> +0 + +> +0.548039 + +> +-1.94298 + +> +-1.39751 + +> +-0.193241 + +> +40 + +> +-0.650867 + +> +0.453 + +$$$$ +L_1YET + OpenBabel01132416383D +libRbt.so/2021.1/901 2021/07/19 + 40 41 0 0 0 0 0 0 0 0999 V2000 + 38.3002 9.9529 19.9874 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.5699 12.7952 23.6729 O 0 0 0 0 0 0 0 0 0 0 0 0 + 31.3890 11.1002 23.7922 O 0 0 0 0 0 0 0 0 0 0 0 0 + 30.0708 10.5448 25.5901 O 0 0 0 0 0 0 0 0 0 0 0 0 + 32.9365 5.4713 27.9742 O 0 0 0 0 0 0 0 0 0 0 0 0 + 35.5069 6.7247 28.4682 O 0 0 0 0 0 0 0 0 0 0 0 0 + 34.4199 4.2835 23.7472 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.3862 5.2919 21.4402 O 0 0 0 0 0 0 0 0 0 0 0 0 + 38.1708 7.0743 22.7430 O 0 0 0 0 0 0 0 0 0 0 0 0 + 37.1718 8.0636 20.5160 N 0 0 0 0 0 0 0 0 0 0 0 0 + 29.1895 11.1237 23.5886 N 0 0 0 0 0 0 0 0 0 0 0 0 + 37.7161 9.3267 20.8386 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.6267 9.8056 22.2555 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.4062 10.0150 22.8143 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.1679 10.4800 24.1775 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.0332 11.0528 24.6301 C 0 0 0 0 0 0 0 0 0 0 0 0 + 33.7875 11.3411 23.8682 C 0 0 1 0 0 0 0 0 0 0 0 0 + 32.4837 10.7633 24.5792 C 0 0 2 0 0 0 0 0 0 0 0 0 + 32.5224 9.1414 24.7765 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.4011 8.6121 25.9841 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.3610 7.1642 26.3736 C 0 0 1 0 0 0 0 0 0 0 0 0 + 33.2482 6.8297 27.5834 C 0 0 2 0 0 0 0 0 0 0 0 0 + 34.7386 6.9757 27.2722 C 0 0 2 0 0 0 0 0 0 0 0 0 + 35.2420 5.9909 26.2208 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.7339 6.1234 25.8300 C 0 0 1 0 0 0 0 0 0 0 0 0 + 37.1214 5.2602 24.5803 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3728 5.6694 23.3454 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.1627 5.2447 22.9661 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.4986 5.7169 21.7366 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.1761 6.6979 20.8839 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3858 7.1488 21.2112 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.0512 6.6556 22.4569 C 0 0 0 0 0 0 0 0 0 0 0 0 + 38.9333 10.0497 22.9436 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.7201 13.1597 22.5278 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.1957 10.8885 24.4385 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.6569 8.3148 23.4959 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.8855 6.8365 26.6922 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.3876 7.7894 29.4631 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.0863 7.5705 25.6420 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.7963 2.9122 23.9427 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1 12 2 0 0 0 0 + 2 34 1 0 0 0 0 + 3 35 1 0 0 0 0 + 4 35 2 0 0 0 0 + 6 38 1 0 0 0 0 + 7 28 1 0 0 0 0 + 7 40 1 0 0 0 0 + 8 29 2 0 0 0 0 + 9 32 2 0 0 0 0 + 10 12 1 0 0 0 0 + 10 31 1 0 0 0 0 + 11 35 1 0 0 0 0 + 12 13 1 0 0 0 0 + 13 14 2 0 0 0 0 + 13 33 1 0 0 0 0 + 14 15 1 0 0 0 0 + 15 16 2 0 0 0 0 + 16 17 1 0 0 0 0 + 17 2 1 1 0 0 0 + 17 18 1 0 0 0 0 + 18 3 1 6 0 0 0 + 18 19 1 0 0 0 0 + 19 20 2 0 0 0 0 + 19 36 1 0 0 0 0 + 20 21 1 0 0 0 0 + 21 22 1 0 0 0 0 + 21 37 1 1 0 0 0 + 22 5 1 6 0 0 0 + 22 23 1 0 0 0 0 + 23 6 1 1 0 0 0 + 23 24 1 0 0 0 0 + 24 25 1 0 0 0 0 + 25 26 1 0 0 0 0 + 25 39 1 6 0 0 0 + 26 27 1 0 0 0 0 + 27 28 2 0 0 0 0 + 27 32 1 0 0 0 0 + 28 29 1 0 0 0 0 + 29 30 1 0 0 0 0 + 30 31 2 0 0 0 0 + 31 32 1 0 0 0 0 +M END +> +62.79171791,-58.85233332,54.54316359,105.51681679,7.40565879,-68.14090489 + +> +-55.71910518,-162.44118539,1.00360198,-179.77395726,-71.53147779,-61.45481770 +34.57812587,8.15701091,24.17083266,-0.17685013,0.65515812,-0.58756756 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-44.6051 + +> +-25.1088 + +> +1 + +> +-2.34708 + +> +0.00055535 + +> +5 + +> +-27.5316 + +> +-0.627721 + +> +-10.8125 + +> +-9.4007 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-6.11216 + +> +7.09596 + +> +-0.270313 + +> +0 + +> +0 + +> +0 + +> +-8.6837 + +> +0 + +> +3.63459 + +> +-2.86954 + +> +-0.744579 + +> +-0.217093 + +> +40 + +> +-1.11513 + +> +0.382 + +$$$$ +L_1YET + OpenBabel01132416383D +libRbt.so/2021.1/901 2021/07/19 + 40 41 0 0 0 0 0 0 0 0999 V2000 + 38.2459 10.1896 20.2399 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.4830 12.8982 23.9836 O 0 0 0 0 0 0 0 0 0 0 0 0 + 31.3040 11.1972 24.0283 O 0 0 0 0 0 0 0 0 0 0 0 0 + 29.9729 10.5791 25.7960 O 0 0 0 0 0 0 0 0 0 0 0 0 + 32.8284 5.4311 28.0278 O 0 0 0 0 0 0 0 0 0 0 0 0 + 35.3929 6.6704 28.5840 O 0 0 0 0 0 0 0 0 0 0 0 0 + 34.3460 4.3901 23.7743 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.3284 5.4751 21.4951 O 0 0 0 0 0 0 0 0 0 0 0 0 + 38.1000 7.2185 22.8947 O 0 0 0 0 0 0 0 0 0 0 0 0 + 37.1165 8.2818 20.6951 N 0 0 0 0 0 0 0 0 0 0 0 0 + 29.1060 11.2247 23.8087 N 0 0 0 0 0 0 0 0 0 0 0 0 + 37.6563 9.5340 21.0648 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.5552 9.9641 22.4964 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3302 10.1528 23.0526 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.0808 10.5706 24.4290 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.9417 11.1261 24.8922 C 0 0 0 0 0 0 0 0 0 0 0 0 + 33.7014 11.4386 24.1309 C 0 0 1 0 0 0 0 0 0 0 0 0 + 32.3931 10.8352 24.8118 C 0 0 2 0 0 0 0 0 0 0 0 0 + 32.4329 9.2075 24.9540 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.3032 8.6372 26.1418 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.2625 7.1768 26.4814 C 0 0 1 0 0 0 0 0 0 0 0 0 + 33.1409 6.8025 27.6859 C 0 0 2 0 0 0 0 0 0 0 0 0 + 34.6334 6.9609 27.3914 C 0 0 2 0 0 0 0 0 0 0 0 0 + 35.1465 6.0133 26.3109 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.6411 6.1610 25.9364 C 0 0 1 0 0 0 0 0 0 0 0 0 + 37.0395 5.3414 24.6610 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.2997 5.7915 23.4351 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.0933 5.3783 23.0322 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.4378 5.8913 21.8144 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.1202 6.9017 21.0008 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3267 7.3428 21.3526 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.9833 6.8083 22.5859 C 0 0 0 0 0 0 0 0 0 0 0 0 + 38.8562 10.1864 23.2025 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.6414 13.3004 22.8451 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.1061 10.9620 24.6578 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.5785 8.4252 23.6469 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.7851 6.8364 26.7774 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.2644 7.7004 29.6137 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.9926 7.6141 25.8005 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.7232 3.0134 23.9258 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1 12 2 0 0 0 0 + 2 34 1 0 0 0 0 + 3 35 1 0 0 0 0 + 4 35 2 0 0 0 0 + 6 38 1 0 0 0 0 + 7 28 1 0 0 0 0 + 7 40 1 0 0 0 0 + 8 29 2 0 0 0 0 + 9 32 2 0 0 0 0 + 10 12 1 0 0 0 0 + 10 31 1 0 0 0 0 + 11 35 1 0 0 0 0 + 12 13 1 0 0 0 0 + 13 14 2 0 0 0 0 + 13 33 1 0 0 0 0 + 14 15 1 0 0 0 0 + 15 16 2 0 0 0 0 + 16 17 1 0 0 0 0 + 17 2 1 1 0 0 0 + 17 18 1 0 0 0 0 + 18 3 1 6 0 0 0 + 18 19 1 0 0 0 0 + 19 20 2 0 0 0 0 + 19 36 1 0 0 0 0 + 20 21 1 0 0 0 0 + 21 22 1 0 0 0 0 + 21 37 1 1 0 0 0 + 22 5 1 6 0 0 0 + 22 23 1 0 0 0 0 + 23 6 1 1 0 0 0 + 23 24 1 0 0 0 0 + 24 25 1 0 0 0 0 + 25 26 1 0 0 0 0 + 25 39 1 6 0 0 0 + 26 27 1 0 0 0 0 + 27 28 2 0 0 0 0 + 27 32 1 0 0 0 0 + 28 29 1 0 0 0 0 + 29 30 1 0 0 0 0 + 30 31 2 0 0 0 0 + 31 32 1 0 0 0 0 +M END +> +62.81267260,-58.15417092,-65.74127259,-143.34368950,-176.45018893,-68.37175072 + +> +153.35565991,-165.68803831,4.53544200,-177.88887697,-72.81258653,-71.55973605 +34.49360084,8.24525559,24.32646478,-0.15166548,0.62652087,-0.58883898 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-45.7995 + +> +-26.5214 + +> +1 + +> +-2.73453 + +> +0 + +> +5 + +> +-27.624 + +> +-0.663034 + +> +-10.3214 + +> +-6.0985 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-7.27218 + +> +7.09596 + +> +-0.258036 + +> +0 + +> +0 + +> +0 + +> +-8.95671 + +> +0 + +> +2.91825 + +> +-2.86902 + +> +-0.661176 + +> +-0.223918 + +> +40 + +> +-1.14499 + +> +0.023 + +$$$$ +L_1YET + OpenBabel01132416383D +libRbt.so/2021.1/901 2021/07/19 + 40 41 0 0 0 0 0 0 0 0999 V2000 + 38.2462 10.1978 20.1635 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.4958 12.9178 23.9150 O 0 0 0 0 0 0 0 0 0 0 0 0 + 31.3166 11.2174 23.9711 O 0 0 0 0 0 0 0 0 0 0 0 0 + 29.9910 10.6043 25.7446 O 0 0 0 0 0 0 0 0 0 0 0 0 + 32.8522 5.4617 27.9813 O 0 0 0 0 0 0 0 0 0 0 0 0 + 35.4188 6.7018 28.5261 O 0 0 0 0 0 0 0 0 0 0 0 0 + 34.3561 4.4088 23.7258 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.3316 5.4880 21.4469 O 0 0 0 0 0 0 0 0 0 0 0 0 + 38.1080 7.2340 22.8268 O 0 0 0 0 0 0 0 0 0 0 0 0 + 37.1178 8.2916 20.6274 N 0 0 0 0 0 0 0 0 0 0 0 0 + 29.1179 11.2448 23.7584 N 0 0 0 0 0 0 0 0 0 0 0 0 + 37.6591 9.5446 20.9920 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.5627 9.9786 22.4228 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3395 10.1691 22.9824 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.0944 10.5907 24.3584 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.9570 11.1477 24.8237 C 0 0 0 0 0 0 0 0 0 0 0 0 + 33.7144 11.4584 24.0655 C 0 0 1 0 0 0 0 0 0 0 0 0 + 32.4081 10.8572 24.7521 C 0 0 2 0 0 0 0 0 0 0 0 0 + 32.4480 9.2299 24.8985 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.3219 8.6628 26.0883 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.2819 7.2033 26.4320 C 0 0 1 0 0 0 0 0 0 0 0 0 + 33.1640 6.8320 27.6347 C 0 0 2 0 0 0 0 0 0 0 0 0 + 34.6556 6.9893 27.3351 C 0 0 2 0 0 0 0 0 0 0 0 0 + 35.1650 6.0386 26.2555 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.6585 6.1850 25.8759 C 0 0 1 0 0 0 0 0 0 0 0 0 + 37.0527 5.3619 24.6014 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3091 5.8089 23.3766 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.1013 5.3949 22.9787 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.4421 5.9048 21.7616 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.1222 6.9128 20.9432 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3299 7.3545 21.2899 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.9903 6.8232 22.5226 C 0 0 0 0 0 0 0 0 0 0 0 0 + 38.8659 10.2024 23.1242 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.6508 13.3170 22.7780 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.1206 10.9842 24.6050 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.5892 8.4440 23.5932 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.8053 6.8642 26.7335 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.2937 7.7346 29.5533 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.0099 7.6377 25.7350 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.7334 3.0325 23.8798 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1 12 2 0 0 0 0 + 2 34 1 0 0 0 0 + 3 35 1 0 0 0 0 + 4 35 2 0 0 0 0 + 6 38 1 0 0 0 0 + 7 28 1 0 0 0 0 + 7 40 1 0 0 0 0 + 8 29 2 0 0 0 0 + 9 32 2 0 0 0 0 + 10 12 1 0 0 0 0 + 10 31 1 0 0 0 0 + 11 35 1 0 0 0 0 + 12 13 1 0 0 0 0 + 13 14 2 0 0 0 0 + 13 33 1 0 0 0 0 + 14 15 1 0 0 0 0 + 15 16 2 0 0 0 0 + 16 17 1 0 0 0 0 + 17 2 1 1 0 0 0 + 17 18 1 0 0 0 0 + 18 3 1 6 0 0 0 + 18 19 1 0 0 0 0 + 19 20 2 0 0 0 0 + 19 36 1 0 0 0 0 + 20 21 1 0 0 0 0 + 21 22 1 0 0 0 0 + 21 37 1 1 0 0 0 + 22 5 1 6 0 0 0 + 22 23 1 0 0 0 0 + 23 6 1 1 0 0 0 + 23 24 1 0 0 0 0 + 24 25 1 0 0 0 0 + 25 26 1 0 0 0 0 + 25 39 1 6 0 0 0 + 26 27 1 0 0 0 0 + 27 28 2 0 0 0 0 + 27 32 1 0 0 0 0 + 28 29 1 0 0 0 0 + 29 30 1 0 0 0 0 + 30 31 2 0 0 0 0 + 31 32 1 0 0 0 0 +M END +> +61.77681755,179.71524812,-65.74639953,60.00961258,7.79230598,63.31884815 + +> +155.52139670,-165.14608221,3.26862973,-178.11893874,-75.75911891,-62.18199427 +34.50656668,8.26568170,24.26741162,-0.16349640,0.62688205,-0.59402855 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-40.7907 + +> +-24.1639 + +> +1 + +> +-2.09501 + +> +0.00203538 + +> +5 + +> +-27.451 + +> +-0.604097 + +> +-10.2781 + +> +-6.68432 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-6.93596 + +> +7.09596 + +> +-0.256953 + +> +0 + +> +0 + +> +0 + +> +-6.34872 + +> +0 + +> +0.247655 + +> +-1.03953 + +> +-2.93814 + +> +-0.158718 + +> +40 + +> +-1.01977 + +> +0.029 + +$$$$ diff --git a/rdock-utils/tests/fixtures/sdrmsd/aligned-nofit.sdf b/rdock-utils/tests/fixtures/sdrmsd/aligned-nofit.sdf new file mode 100644 index 00000000..bdf79c8c --- /dev/null +++ b/rdock-utils/tests/fixtures/sdrmsd/aligned-nofit.sdf @@ -0,0 +1,1025 @@ +L_1YET + OpenBabel01132416173D +libRbt.so/2021.1/901 2021/07/19 + 40 41 0 0 0 0 0 0 0 0999 V2000 + 38.1989 10.1357 20.2072 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.5670 12.9485 24.0376 O 0 0 0 0 0 0 0 0 0 0 0 0 + 31.3419 11.3089 24.1011 O 0 0 0 0 0 0 0 0 0 0 0 0 + 30.0189 10.7150 25.8831 O 0 0 0 0 0 0 0 0 0 0 0 0 + 32.7595 5.4724 28.0373 O 0 0 0 0 0 0 0 0 0 0 0 0 + 35.3654 6.6351 28.5658 O 0 0 0 0 0 0 0 0 0 0 0 0 + 34.1874 4.4213 23.7553 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.1689 5.5516 21.4986 O 0 0 0 0 0 0 0 0 0 0 0 0 + 38.0068 7.1500 22.8426 O 0 0 0 0 0 0 0 0 0 0 0 0 + 37.0228 8.2570 20.6648 N 0 0 0 0 0 0 0 0 0 0 0 0 + 29.1427 11.3996 23.9130 N 0 0 0 0 0 0 0 0 0 0 0 0 + 37.6027 9.4907 21.0357 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.5339 9.9127 22.4717 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3226 10.1314 23.0466 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.1043 10.5457 24.4293 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.9879 11.1294 24.9126 C 0 0 0 0 0 0 0 0 0 0 0 0 + 33.7464 11.4822 24.1713 C 0 0 1 0 0 0 0 0 0 0 0 0 + 32.4313 10.9106 24.8664 C 0 0 2 0 0 0 0 0 0 0 0 0 + 32.4273 9.2814 24.9964 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.2983 8.7060 26.1819 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.2213 7.2448 26.5116 C 0 0 1 0 0 0 0 0 0 0 0 0 + 33.1056 6.8370 27.7008 C 0 0 2 0 0 0 0 0 0 0 0 0 + 34.5977 6.9558 27.3862 C 0 0 2 0 0 0 0 0 0 0 0 0 + 35.0687 6.0023 26.2918 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.5615 6.1109 25.8971 C 0 0 1 0 0 0 0 0 0 0 0 0 + 36.9188 5.2901 24.6103 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.1748 5.7700 23.3983 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.9517 5.3938 23.0097 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.2939 5.9341 21.8051 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.9930 6.9311 20.9891 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.2162 7.3355 21.3268 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.8748 6.7736 22.5468 C 0 0 0 0 0 0 0 0 0 0 0 0 + 38.8504 10.0931 23.1607 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.7212 13.3826 22.9140 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.1468 11.1026 24.7459 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.5325 8.5052 23.6819 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.7392 6.9438 26.8261 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.2803 7.6605 29.6045 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.9518 7.5546 25.7666 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.5278 3.0335 23.8916 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1 12 2 0 0 0 0 + 2 34 1 0 0 0 0 + 3 35 1 0 0 0 0 + 4 35 2 0 0 0 0 + 6 38 1 0 0 0 0 + 7 28 1 0 0 0 0 + 7 40 1 0 0 0 0 + 8 29 2 0 0 0 0 + 9 32 2 0 0 0 0 + 10 12 1 0 0 0 0 + 10 31 1 0 0 0 0 + 11 35 1 0 0 0 0 + 12 13 1 0 0 0 0 + 13 14 2 0 0 0 0 + 13 33 1 0 0 0 0 + 14 15 1 0 0 0 0 + 15 16 2 0 0 0 0 + 16 17 1 0 0 0 0 + 17 2 1 1 0 0 0 + 17 18 1 0 0 0 0 + 18 3 1 6 0 0 0 + 18 19 1 0 0 0 0 + 19 20 2 0 0 0 0 + 19 36 1 0 0 0 0 + 20 21 1 0 0 0 0 + 21 22 1 0 0 0 0 + 21 37 1 1 0 0 0 + 22 5 1 6 0 0 0 + 22 23 1 0 0 0 0 + 23 6 1 1 0 0 0 + 23 24 1 0 0 0 0 + 24 25 1 0 0 0 0 + 25 26 1 0 0 0 0 + 25 39 1 6 0 0 0 + 26 27 1 0 0 0 0 + 27 28 2 0 0 0 0 + 27 32 1 0 0 0 0 + 28 29 1 0 0 0 0 + 29 30 1 0 0 0 0 + 30 31 2 0 0 0 0 + 31 32 1 0 0 0 0 +M END +> +64.12540954,-57.65322675,53.34742205,-57.14100212,-176.35502015,-68.63555890 + +> +156.53968631,-167.77671564,5.21130411,-176.44975611,-71.16602861,-66.94133215 +34.45104295,8.26640344,24.33299797,-0.16161449,0.65294462,-0.57169818 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-44.8298 + +> +-23.9918 + +> +1 + +> +-2.0203 + +> +0 + +> +5 + +> +-27.5227 + +> +-0.599794 + +> +-10.2712 + +> +-7.26837 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-6.63705 + +> +7.09596 + +> +-0.256781 + +> +0 + +> +0 + +> +0 + +> +-10.5668 + +> +0 + +> +0.627995 + +> +-2.86952 + +> +-1.12445 + +> +-0.26417 + +> +40 + +> +-1.12075 + +> +0.000 + +$$$$ +L_1YET + OpenBabel01132416173D +libRbt.so/2021.1/901 2021/07/19 + 40 41 0 0 0 0 0 0 0 0999 V2000 + 36.9035 5.9169 18.0380 O 0 0 0 0 0 0 0 0 0 0 0 0 + 35.7082 1.2881 22.6406 O 0 0 0 0 0 0 0 0 0 0 0 0 + 36.9178 2.0470 25.0080 O 0 0 0 0 0 0 0 0 0 0 0 0 + 36.1480 2.0431 27.1727 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.3239 7.5533 27.8946 O 0 0 0 0 0 0 0 0 0 0 0 0 + 31.4546 7.3062 25.6884 O 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3721 9.4873 24.9882 O 0 0 0 0 0 0 0 0 0 0 0 0 + 38.7273 8.3272 24.2707 O 0 0 0 0 0 0 0 0 0 0 0 0 + 34.9937 8.3515 20.5523 O 0 0 0 0 0 0 0 0 0 0 0 0 + 37.2657 7.2164 19.8552 N 0 0 0 0 0 0 0 0 0 0 0 0 + 38.1762 1.2087 26.6184 N 0 0 0 0 0 0 0 0 0 0 0 0 + 36.5482 6.2243 19.1501 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.3130 5.6517 19.7758 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.4115 4.9696 20.9465 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.2983 4.3586 21.6665 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.3963 3.3785 22.5887 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.6292 2.7033 23.0778 C 0 0 1 0 0 0 0 0 0 0 0 0 + 35.7449 2.7099 24.6672 C 0 0 2 0 0 0 0 0 0 0 0 0 + 35.7756 4.2145 25.3048 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.8719 4.5788 26.2013 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.7534 5.8800 26.9380 C 0 0 1 0 0 0 0 0 0 0 0 0 + 33.3207 6.4354 26.9750 C 0 0 2 0 0 0 0 0 0 0 0 0 + 32.8278 6.8709 25.5942 C 0 0 2 0 0 0 0 0 0 0 0 0 + 33.6123 8.0405 25.0068 C 0 0 0 0 0 0 0 0 0 0 0 0 + 33.1887 8.4944 23.5888 C 0 0 1 0 0 0 0 0 0 0 0 0 + 34.1845 9.5220 22.9487 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.5597 8.9499 22.7639 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.5432 8.9231 23.6697 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.8634 8.3233 23.3992 C 0 0 0 0 0 0 0 0 0 0 0 0 + 38.1256 7.7214 22.0887 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.1835 7.7276 21.1474 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.8515 8.3460 21.4325 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.0413 5.8610 19.0146 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.8910 1.0820 21.1948 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.9998 1.7886 26.3545 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.9185 5.1169 24.8350 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.2571 5.6179 28.3746 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.5388 6.2394 26.0896 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.9795 7.2956 22.7098 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.5005 8.7603 26.2192 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1 12 2 0 0 0 0 + 2 34 1 0 0 0 0 + 3 35 1 0 0 0 0 + 4 35 2 0 0 0 0 + 6 38 1 0 0 0 0 + 7 28 1 0 0 0 0 + 7 40 1 0 0 0 0 + 8 29 2 0 0 0 0 + 9 32 2 0 0 0 0 + 10 12 1 0 0 0 0 + 10 31 1 0 0 0 0 + 11 35 1 0 0 0 0 + 12 13 1 0 0 0 0 + 13 14 2 0 0 0 0 + 13 33 1 0 0 0 0 + 14 15 1 0 0 0 0 + 15 16 2 0 0 0 0 + 16 17 1 0 0 0 0 + 17 2 1 1 0 0 0 + 17 18 1 0 0 0 0 + 18 3 1 6 0 0 0 + 18 19 1 0 0 0 0 + 19 20 2 0 0 0 0 + 19 36 1 0 0 0 0 + 20 21 1 0 0 0 0 + 21 22 1 0 0 0 0 + 21 37 1 1 0 0 0 + 22 5 1 1 0 0 0 + 22 23 1 0 0 0 0 + 23 6 1 1 0 0 0 + 23 24 1 0 0 0 0 + 24 25 1 0 0 0 0 + 25 26 1 0 0 0 0 + 25 39 1 6 0 0 0 + 26 27 1 0 0 0 0 + 27 28 2 0 0 0 0 + 27 32 1 0 0 0 0 + 28 29 1 0 0 0 0 + 29 30 1 0 0 0 0 + 30 31 2 0 0 0 0 + 31 32 1 0 0 0 0 +M END +> +62.20781910,64.30415179,-178.11010172,-58.10081097,7.54113525,-68.17322223 + +> +67.48601327,-169.27579335,2.88060764,-176.09387410,-63.63147672,120.70739357 +35.39014364,5.88426981,23.71740651,-1.24154136,-1.19338794,2.37044843 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-26.0347 + +> +-6.22447 + +> +1 + +> +-0.587536 + +> +0.254651 + +> +5 + +> +-15.9001 + +> +-0.155612 + +> +-12.0806 + +> +-10.6731 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-6.74403 + +> +7.09596 + +> +-0.302015 + +> +0 + +> +0 + +> +0 + +> +-7.72963 + +> +0 + +> +0.548039 + +> +-1.94298 + +> +-1.39751 + +> +-0.193241 + +> +40 + +> +-0.650867 + +> +6.685 + +$$$$ +L_1YET + OpenBabel01132416173D +libRbt.so/2021.1/901 2021/07/19 + 40 41 0 0 0 0 0 0 0 0999 V2000 + 38.2688 9.8717 19.8904 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.4581 12.7312 23.4567 O 0 0 0 0 0 0 0 0 0 0 0 0 + 31.3110 10.9968 23.6158 O 0 0 0 0 0 0 0 0 0 0 0 0 + 30.0023 10.6063 25.4633 O 0 0 0 0 0 0 0 0 0 0 0 0 + 32.9431 5.5335 27.9811 O 0 0 0 0 0 0 0 0 0 0 0 0 + 35.4846 6.8534 28.4512 O 0 0 0 0 0 0 0 0 0 0 0 0 + 34.4780 4.2448 23.8023 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.4398 5.1596 21.4587 O 0 0 0 0 0 0 0 0 0 0 0 0 + 38.1789 7.0784 22.7339 O 0 0 0 0 0 0 0 0 0 0 0 0 + 37.1751 7.9773 20.4710 N 0 0 0 0 0 0 0 0 0 0 0 0 + 29.1138 11.1640 23.4591 N 0 0 0 0 0 0 0 0 0 0 0 0 + 37.6918 9.2607 20.7572 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.5833 9.7815 22.1579 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3553 9.9836 22.7026 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.0986 10.4858 24.0490 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.9496 11.0493 24.4767 C 0 0 0 0 0 0 0 0 0 0 0 0 + 33.7036 11.2885 23.6986 C 0 0 1 0 0 0 0 0 0 0 0 0 + 32.4069 10.7068 24.4195 C 0 0 2 0 0 0 0 0 0 0 0 0 + 32.4768 9.0930 24.6678 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.3581 8.5992 25.8905 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.3445 7.1636 26.3249 C 0 0 1 0 0 0 0 0 0 0 0 0 + 33.2301 6.8851 27.5499 C 0 0 2 0 0 0 0 0 0 0 0 0 + 34.7193 7.0514 27.2432 C 0 0 2 0 0 0 0 0 0 0 0 0 + 35.2493 6.0448 26.2262 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.7409 6.1952 25.8405 C 0 0 1 0 0 0 0 0 0 0 0 0 + 37.1540 5.3015 24.6206 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.4055 5.6568 23.3692 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.2067 5.1960 22.9960 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.5414 5.6162 21.7484 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.2047 6.5836 20.8695 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.4030 7.0688 21.1897 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.0699 6.6284 22.4543 C 0 0 0 0 0 0 0 0 0 0 0 0 + 38.8803 10.0733 22.8458 C 0 0 0 0 0 0 0 0 0 0 0 0 + 33.4075 13.5750 24.6615 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.1221 10.8942 24.2961 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.6363 8.2297 23.4144 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.8737 6.8163 26.6447 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.3440 7.9499 29.4079 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.0655 7.6425 25.6094 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.9342 2.9250 24.1346 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1 12 2 0 0 0 0 + 2 34 1 0 0 0 0 + 3 35 1 0 0 0 0 + 4 35 2 0 0 0 0 + 6 38 1 0 0 0 0 + 7 28 1 0 0 0 0 + 7 40 1 0 0 0 0 + 8 29 2 0 0 0 0 + 9 32 2 0 0 0 0 + 10 12 1 0 0 0 0 + 10 31 1 0 0 0 0 + 11 35 1 0 0 0 0 + 12 13 1 0 0 0 0 + 13 14 2 0 0 0 0 + 13 33 1 0 0 0 0 + 14 15 1 0 0 0 0 + 15 16 2 0 0 0 0 + 16 17 1 0 0 0 0 + 17 2 1 1 0 0 0 + 17 18 1 0 0 0 0 + 18 3 1 6 0 0 0 + 18 19 1 0 0 0 0 + 19 20 2 0 0 0 0 + 19 36 1 0 0 0 0 + 20 21 1 0 0 0 0 + 21 22 1 0 0 0 0 + 21 37 1 1 0 0 0 + 22 5 1 6 0 0 0 + 22 23 1 0 0 0 0 + 23 6 1 1 0 0 0 + 23 24 1 0 0 0 0 + 24 25 1 0 0 0 0 + 25 26 1 0 0 0 0 + 25 39 1 6 0 0 0 + 26 27 1 0 0 0 0 + 27 28 2 0 0 0 0 + 27 32 1 0 0 0 0 + 28 29 1 0 0 0 0 + 29 30 1 0 0 0 0 + 30 31 2 0 0 0 0 + 31 32 1 0 0 0 0 +M END +> +62.79171791,-58.85233332,54.54316359,105.51681679,7.40565879,-68.14090489 + +> +-55.71910518,-162.44118539,1.00360198,-179.77395726,-71.53147779,-61.45481770 +34.57812587,8.15701091,24.17083266,-0.17685013,0.65515812,-0.58756756 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-44.6051 + +> +-25.1088 + +> +1 + +> +-2.34708 + +> +0.00055535 + +> +5 + +> +-27.5316 + +> +-0.627721 + +> +-10.8125 + +> +-9.4007 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-6.11216 + +> +7.09596 + +> +-0.270313 + +> +0 + +> +0 + +> +0 + +> +-8.6837 + +> +0 + +> +3.63459 + +> +-2.86954 + +> +-0.744579 + +> +-0.217093 + +> +40 + +> +-1.11513 + +> +0.475 + +$$$$ +L_1YET + OpenBabel01132416173D +libRbt.so/2021.1/901 2021/07/19 + 40 41 0 0 0 0 0 0 0 0999 V2000 + 38.2427 10.1933 20.2435 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.4678 12.8906 23.9802 O 0 0 0 0 0 0 0 0 0 0 0 0 + 31.2940 11.1828 24.0242 O 0 0 0 0 0 0 0 0 0 0 0 0 + 29.9678 10.6293 25.8168 O 0 0 0 0 0 0 0 0 0 0 0 0 + 32.8322 5.4249 28.0302 O 0 0 0 0 0 0 0 0 0 0 0 0 + 35.3924 6.6725 28.5879 O 0 0 0 0 0 0 0 0 0 0 0 0 + 34.3572 4.3848 23.7791 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.3386 5.4648 21.4980 O 0 0 0 0 0 0 0 0 0 0 0 0 + 38.1034 7.2241 22.9007 O 0 0 0 0 0 0 0 0 0 0 0 0 + 37.1187 8.2824 20.6992 N 0 0 0 0 0 0 0 0 0 0 0 0 + 29.0951 11.2567 23.8263 N 0 0 0 0 0 0 0 0 0 0 0 0 + 37.6543 9.5366 21.0683 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.5505 9.9677 22.4995 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3244 10.1530 23.0544 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.0723 10.5713 24.4301 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.9310 11.1236 24.8917 C 0 0 0 0 0 0 0 0 0 0 0 0 + 33.6906 11.4317 24.1289 C 0 0 1 0 0 0 0 0 0 0 0 0 + 32.3834 10.8248 24.8091 C 0 0 2 0 0 0 0 0 0 0 0 0 + 32.4282 9.1974 24.9528 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.2991 8.6277 26.1409 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.2625 7.1674 26.4818 C 0 0 1 0 0 0 0 0 0 0 0 0 + 33.1409 6.7969 27.6875 C 0 0 2 0 0 0 0 0 0 0 0 0 + 34.6331 6.9598 27.3942 C 0 0 2 0 0 0 0 0 0 0 0 0 + 35.1502 6.0128 26.3151 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.6447 6.1647 25.9419 C 0 0 1 0 0 0 0 0 0 0 0 0 + 37.0470 5.3453 24.6675 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3069 5.7921 23.4406 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.1022 5.3747 23.0369 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.4463 5.8847 21.8180 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.1264 6.8965 21.0043 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3312 7.3415 21.3568 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.9883 6.8102 22.5912 C 0 0 0 0 0 0 0 0 0 0 0 0 + 38.8502 10.1945 23.2066 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.6873 13.2942 22.7995 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.0977 10.9873 24.6702 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.5774 8.4144 23.6466 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.7858 6.8229 26.7766 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.2902 7.7212 29.6015 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.9919 7.6188 25.8051 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.6874 2.9900 23.8549 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1 12 2 0 0 0 0 + 2 34 1 0 0 0 0 + 3 35 1 0 0 0 0 + 4 35 2 0 0 0 0 + 6 38 1 0 0 0 0 + 7 28 1 0 0 0 0 + 7 40 1 0 0 0 0 + 8 29 2 0 0 0 0 + 9 32 2 0 0 0 0 + 10 12 1 0 0 0 0 + 10 31 1 0 0 0 0 + 11 35 1 0 0 0 0 + 12 13 1 0 0 0 0 + 13 14 2 0 0 0 0 + 13 33 1 0 0 0 0 + 14 15 1 0 0 0 0 + 15 16 2 0 0 0 0 + 16 17 1 0 0 0 0 + 17 2 1 1 0 0 0 + 17 18 1 0 0 0 0 + 18 3 1 6 0 0 0 + 18 19 1 0 0 0 0 + 19 20 2 0 0 0 0 + 19 36 1 0 0 0 0 + 20 21 1 0 0 0 0 + 21 22 1 0 0 0 0 + 21 37 1 1 0 0 0 + 22 5 1 6 0 0 0 + 22 23 1 0 0 0 0 + 23 6 1 1 0 0 0 + 23 24 1 0 0 0 0 + 24 25 1 0 0 0 0 + 25 26 1 0 0 0 0 + 25 39 1 6 0 0 0 + 26 27 1 0 0 0 0 + 27 28 2 0 0 0 0 + 27 32 1 0 0 0 0 + 28 29 1 0 0 0 0 + 29 30 1 0 0 0 0 + 30 31 2 0 0 0 0 + 31 32 1 0 0 0 0 +M END +> +62.81267260,-58.15417092,-65.74127259,-143.34368950,-176.45018893,-68.37175072 + +> +153.35565991,-165.68803831,4.53544200,-177.88887697,-72.81258653,-71.55973605 +34.49360084,8.24525559,24.32646478,-0.15166548,0.62652087,-0.58883898 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-45.7995 + +> +-26.5214 + +> +1 + +> +-2.73453 + +> +0 + +> +5 + +> +-27.624 + +> +-0.663034 + +> +-10.3214 + +> +-6.0985 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-7.27218 + +> +7.09596 + +> +-0.258036 + +> +0 + +> +0 + +> +0 + +> +-8.95671 + +> +0 + +> +2.91825 + +> +-2.86902 + +> +-0.661176 + +> +-0.223918 + +> +40 + +> +-1.14499 + +> +0.117 + +$$$$ +L_1YET + OpenBabel01132416173D +libRbt.so/2021.1/901 2021/07/19 + 40 41 0 0 0 0 0 0 0 0999 V2000 + 38.2479 10.2021 20.1714 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.4847 12.9092 23.9159 O 0 0 0 0 0 0 0 0 0 0 0 0 + 31.3082 11.2051 23.9650 O 0 0 0 0 0 0 0 0 0 0 0 0 + 29.9857 10.6544 25.7612 O 0 0 0 0 0 0 0 0 0 0 0 0 + 32.8446 5.4468 27.9712 O 0 0 0 0 0 0 0 0 0 0 0 0 + 35.4080 6.6905 28.5233 O 0 0 0 0 0 0 0 0 0 0 0 0 + 34.3597 4.4020 23.7177 O 0 0 0 0 0 0 0 0 0 0 0 0 + 33.3384 5.4824 21.4379 O 0 0 0 0 0 0 0 0 0 0 0 0 + 38.1089 7.2346 22.8306 O 0 0 0 0 0 0 0 0 0 0 0 0 + 37.1217 8.2934 20.6303 N 0 0 0 0 0 0 0 0 0 0 0 0 + 29.1095 11.3195 23.7844 N 0 0 0 0 0 0 0 0 0 0 0 0 + 37.6600 9.5469 20.9977 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.5597 9.9788 22.4289 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3350 10.1665 22.9861 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.0862 10.5859 24.3620 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.9467 11.1404 24.8255 C 0 0 0 0 0 0 0 0 0 0 0 0 + 33.7054 11.4500 24.0649 C 0 0 1 0 0 0 0 0 0 0 0 0 + 32.3985 10.8457 24.7480 C 0 0 2 0 0 0 0 0 0 0 0 0 + 32.4409 9.2183 24.8924 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.3131 8.6495 26.0812 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.2748 7.1894 26.4229 C 0 0 1 0 0 0 0 0 0 0 0 0 + 33.1549 6.8182 27.6271 C 0 0 2 0 0 0 0 0 0 0 0 0 + 34.6468 6.9784 27.3308 C 0 0 2 0 0 0 0 0 0 0 0 0 + 35.1602 6.0299 26.2513 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.6543 6.1792 25.8751 C 0 0 1 0 0 0 0 0 0 0 0 0 + 37.0527 5.3585 24.6004 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3111 5.8058 23.3746 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.1049 5.3902 22.9734 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.4475 5.9006 21.7556 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.1277 6.9109 20.9400 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.3338 7.3541 21.2899 C 0 0 0 0 0 0 0 0 0 0 0 0 + 36.9924 6.8224 22.5234 C 0 0 0 0 0 0 0 0 0 0 0 0 + 38.8611 10.2039 23.1334 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.6607 13.3100 22.7641 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.1134 11.0231 24.6177 C 0 0 0 0 0 0 0 0 0 0 0 0 + 32.5863 8.4344 23.5864 C 0 0 0 0 0 0 0 0 0 0 0 0 + 30.7981 6.8475 26.7207 C 0 0 0 0 0 0 0 0 0 0 0 0 + 35.3649 7.7700 29.5083 C 0 0 0 0 0 0 0 0 0 0 0 0 + 37.0036 7.6327 25.7369 C 0 0 0 0 0 0 0 0 0 0 0 0 + 34.7864 3.0517 23.9521 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1 12 2 0 0 0 0 + 2 34 1 0 0 0 0 + 3 35 1 0 0 0 0 + 4 35 2 0 0 0 0 + 6 38 1 0 0 0 0 + 7 28 1 0 0 0 0 + 7 40 1 0 0 0 0 + 8 29 2 0 0 0 0 + 9 32 2 0 0 0 0 + 10 12 1 0 0 0 0 + 10 31 1 0 0 0 0 + 11 35 1 0 0 0 0 + 12 13 1 0 0 0 0 + 13 14 2 0 0 0 0 + 13 33 1 0 0 0 0 + 14 15 1 0 0 0 0 + 15 16 2 0 0 0 0 + 16 17 1 0 0 0 0 + 17 2 1 1 0 0 0 + 17 18 1 0 0 0 0 + 18 3 1 6 0 0 0 + 18 19 1 0 0 0 0 + 19 20 2 0 0 0 0 + 19 36 1 0 0 0 0 + 20 21 1 0 0 0 0 + 21 22 1 0 0 0 0 + 21 37 1 1 0 0 0 + 22 5 1 6 0 0 0 + 22 23 1 0 0 0 0 + 23 6 1 1 0 0 0 + 23 24 1 0 0 0 0 + 24 25 1 0 0 0 0 + 25 26 1 0 0 0 0 + 25 39 1 6 0 0 0 + 26 27 1 0 0 0 0 + 27 28 2 0 0 0 0 + 27 32 1 0 0 0 0 + 28 29 1 0 0 0 0 + 29 30 1 0 0 0 0 + 30 31 2 0 0 0 0 + 31 32 1 0 0 0 0 +M END +> +61.77681755,179.71524812,-65.74639953,60.00961258,7.79230598,63.31884815 + +> +155.52139670,-165.14608221,3.26862973,-178.11893874,-75.75911891,-62.18199427 +34.50656668,8.26568170,24.26741162,-0.16349640,0.62688205,-0.59402855 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-40.7907 + +> +-24.1639 + +> +1 + +> +-2.09501 + +> +0.00203538 + +> +5 + +> +-27.451 + +> +-0.604097 + +> +-10.2781 + +> +-6.68432 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-6.93596 + +> +7.09596 + +> +-0.256953 + +> +0 + +> +0 + +> +0 + +> +-6.34872 + +> +0 + +> +0.247655 + +> +-1.03953 + +> +-2.93814 + +> +-0.158718 + +> +40 + +> +-1.01977 + +> +0.136 + +$$$$ diff --git a/rdock-utils/tests/fixtures/sdrmsd/input.sdf b/rdock-utils/tests/fixtures/sdrmsd/input.sdf new file mode 100644 index 00000000..37796bae --- /dev/null +++ b/rdock-utils/tests/fixtures/sdrmsd/input.sdf @@ -0,0 +1,1050 @@ +L_1YET + rDOCK(R) 3D +libRbt.so/2021.1/901 2021/07/19 + 44 45 0 0 0 0 0 0 0 0999 V2000 + 38.1989 10.1357 20.2072 O 0 0 0 0 0 0 + 33.5670 12.9485 24.0376 O 0 0 0 0 0 0 + 31.3419 11.3089 24.1011 O 0 0 0 0 0 0 + 30.0189 10.7150 25.8831 O 0 0 0 0 0 0 + 32.7595 5.4724 28.0373 O 0 0 0 0 0 0 + 35.3654 6.6351 28.5658 O 0 0 0 0 0 0 + 34.1874 4.4213 23.7553 O 0 0 0 0 0 0 + 33.1689 5.5516 21.4986 O 0 0 0 0 0 0 + 38.0068 7.1500 22.8426 O 0 0 0 0 0 0 + 37.0228 8.2570 20.6648 N 0 0 0 0 0 0 + 29.1427 11.3996 23.9130 N 0 0 0 0 0 0 + 37.6027 9.4907 21.0357 C 0 0 0 0 0 0 + 37.5339 9.9127 22.4717 C 0 0 0 0 0 0 + 36.3226 10.1314 23.0466 C 0 0 0 0 0 0 + 36.1043 10.5457 24.4293 C 0 0 0 0 0 0 + 34.9879 11.1294 24.9126 C 0 0 0 0 0 0 + 33.7464 11.4822 24.1713 C 0 0 0 0 0 0 + 32.4313 10.9106 24.8664 C 0 0 0 0 0 0 + 32.4273 9.2814 24.9964 C 0 0 0 0 0 0 + 32.2983 8.7060 26.1819 C 0 0 0 0 0 0 + 32.2213 7.2448 26.5116 C 0 0 0 0 0 0 + 33.1056 6.8370 27.7008 C 0 0 0 0 0 0 + 34.5977 6.9558 27.3862 C 0 0 0 0 0 0 + 35.0687 6.0023 26.2918 C 0 0 0 0 0 0 + 36.5615 6.1109 25.8971 C 0 0 0 0 0 0 + 36.9188 5.2901 24.6103 C 0 0 0 0 0 0 + 36.1748 5.7700 23.3983 C 0 0 0 0 0 0 + 34.9517 5.3938 23.0097 C 0 0 0 0 0 0 + 34.2939 5.9341 21.8051 C 0 0 0 0 0 0 + 34.9930 6.9311 20.9891 C 0 0 0 0 0 0 + 36.2162 7.3355 21.3268 C 0 0 0 0 0 0 + 36.8748 6.7736 22.5468 C 0 0 0 0 0 0 + 38.8504 10.0931 23.1607 C 0 0 0 0 0 0 + 32.7212 13.3826 22.9140 C 0 0 0 0 0 0 + 30.1468 11.1026 24.7459 C 0 0 0 0 0 0 + 32.5325 8.5052 23.6819 C 0 0 0 0 0 0 + 30.7392 6.9438 26.8261 C 0 0 0 0 0 0 + 35.2803 7.6605 29.6045 C 0 0 0 0 0 0 + 36.9518 7.5546 25.7666 C 0 0 0 0 0 0 + 34.5278 3.0335 23.8916 C 0 0 0 0 0 0 + 33.2891 5.1788 28.8705 H 0 0 0 0 0 0 + 37.2441 7.9800 19.6977 H 0 0 0 0 0 0 + 29.3458 11.7243 22.9568 H 0 0 0 0 0 0 + 28.1668 11.3033 24.2279 H 0 0 0 0 0 0 + 1 12 2 0 0 0 + 2 17 1 0 0 0 + 2 34 1 0 0 0 + 3 18 1 0 0 0 + 3 35 1 0 0 0 + 4 35 2 0 0 0 + 5 22 1 0 0 0 + 6 23 1 0 0 0 + 6 38 1 0 0 0 + 7 28 1 0 0 0 + 7 40 1 0 0 0 + 8 29 2 0 0 0 + 9 32 2 0 0 0 + 10 12 1 0 0 0 + 10 31 1 0 0 0 + 11 35 1 0 0 0 + 12 13 1 0 0 0 + 13 14 2 0 0 0 + 13 33 1 0 0 0 + 14 15 1 0 0 0 + 15 16 2 0 0 0 + 16 17 1 0 0 0 + 17 18 1 0 0 0 + 18 19 1 0 0 0 + 19 20 2 0 0 0 + 19 36 1 0 0 0 + 20 21 1 0 0 0 + 21 22 1 0 0 0 + 21 37 1 0 0 0 + 22 23 1 0 0 0 + 23 24 1 0 0 0 + 24 25 1 0 0 0 + 25 26 1 0 0 0 + 25 39 1 0 0 0 + 26 27 1 0 0 0 + 27 28 2 0 0 0 + 27 32 1 0 0 0 + 28 29 1 0 0 0 + 29 30 1 0 0 0 + 30 31 2 0 0 0 + 31 32 1 0 0 0 + 5 41 1 0 0 0 + 10 42 1 0 0 0 + 11 43 1 0 0 0 + 11 44 1 0 0 0 +M END +> +64.12540954,-57.65322675,53.34742205,-57.14100212,-176.35502015,-68.63555890 + +> +156.53968631,-167.77671564,5.21130411,-176.44975611,-71.16602861,-66.94133215 +34.45104295,8.26640344,24.33299797,-0.16161449,0.65294462,-0.57169818 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-44.8298 + +> +-23.9918 + +> +1 + +> +-2.0203 + +> +0 + +> +5 + +> +-27.5227 + +> +-0.599794 + +> +-10.2712 + +> +-7.26837 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-6.63705 + +> +7.09596 + +> +-0.256781 + +> +0 + +> +0 + +> +0 + +> +-10.5668 + +> +0 + +> +0.627995 + +> +-2.86952 + +> +-1.12445 + +> +-0.26417 + +> +40 + +> +-1.12075 + +$$$$ +L_1YET + rDOCK(R) 3D +libRbt.so/2021.1/901 2021/07/19 + 44 45 0 0 0 0 0 0 0 0999 V2000 + 36.9035 5.9169 18.0380 O 0 0 0 0 0 0 + 35.7082 1.2881 22.6406 O 0 0 0 0 0 0 + 36.9178 2.0470 25.0080 O 0 0 0 0 0 0 + 36.1480 2.0431 27.1727 O 0 0 0 0 0 0 + 33.3239 7.5533 27.8946 O 0 0 0 0 0 0 + 31.4546 7.3062 25.6884 O 0 0 0 0 0 0 + 36.3721 9.4873 24.9882 O 0 0 0 0 0 0 + 38.7273 8.3272 24.2707 O 0 0 0 0 0 0 + 34.9937 8.3515 20.5523 O 0 0 0 0 0 0 + 37.2657 7.2164 19.8552 N 0 0 0 0 0 0 + 38.1762 1.2087 26.6184 N 0 0 0 0 0 0 + 36.5482 6.2243 19.1501 C 0 0 0 0 0 0 + 35.3130 5.6517 19.7758 C 0 0 0 0 0 0 + 35.4115 4.9696 20.9465 C 0 0 0 0 0 0 + 34.2983 4.3586 21.6665 C 0 0 0 0 0 0 + 34.3963 3.3785 22.5887 C 0 0 0 0 0 0 + 35.6292 2.7033 23.0778 C 0 0 0 0 0 0 + 35.7449 2.7099 24.6672 C 0 0 0 0 0 0 + 35.7756 4.2145 25.3048 C 0 0 0 0 0 0 + 34.8719 4.5788 26.2013 C 0 0 0 0 0 0 + 34.7534 5.8800 26.9380 C 0 0 0 0 0 0 + 33.3207 6.4354 26.9750 C 0 0 0 0 0 0 + 32.8278 6.8709 25.5942 C 0 0 0 0 0 0 + 33.6123 8.0405 25.0068 C 0 0 0 0 0 0 + 33.1887 8.4944 23.5888 C 0 0 0 0 0 0 + 34.1845 9.5220 22.9487 C 0 0 0 0 0 0 + 35.5597 8.9499 22.7639 C 0 0 0 0 0 0 + 36.5432 8.9231 23.6697 C 0 0 0 0 0 0 + 37.8634 8.3233 23.3992 C 0 0 0 0 0 0 + 38.1256 7.7214 22.0887 C 0 0 0 0 0 0 + 37.1835 7.7276 21.1474 C 0 0 0 0 0 0 + 35.8515 8.3460 21.4325 C 0 0 0 0 0 0 + 34.0413 5.8610 19.0146 C 0 0 0 0 0 0 + 35.8910 1.0820 21.1948 C 0 0 0 0 0 0 + 36.9998 1.7886 26.3545 C 0 0 0 0 0 0 + 36.9185 5.1169 24.8350 C 0 0 0 0 0 0 + 35.2571 5.6179 28.3746 C 0 0 0 0 0 0 + 30.5388 6.2394 26.0896 C 0 0 0 0 0 0 + 32.9795 7.2956 22.7098 C 0 0 0 0 0 0 + 36.5005 8.7603 26.2192 C 0 0 0 0 0 0 + 32.3652 7.9153 27.9991 H 0 0 0 0 0 0 + 38.0086 7.6554 19.2927 H 0 0 0 0 0 0 + 38.8444 1.0289 25.8553 H 0 0 0 0 0 0 + 38.4138 0.9420 27.5845 H 0 0 0 0 0 0 + 1 12 2 0 0 0 + 2 17 1 0 0 0 + 2 34 1 0 0 0 + 3 18 1 0 0 0 + 3 35 1 0 0 0 + 4 35 2 0 0 0 + 5 22 1 0 0 0 + 6 23 1 0 0 0 + 6 38 1 0 0 0 + 7 28 1 0 0 0 + 7 40 1 0 0 0 + 8 29 2 0 0 0 + 9 32 2 0 0 0 + 10 12 1 0 0 0 + 10 31 1 0 0 0 + 11 35 1 0 0 0 + 12 13 1 0 0 0 + 13 14 2 0 0 0 + 13 33 1 0 0 0 + 14 15 1 0 0 0 + 15 16 2 0 0 0 + 16 17 1 0 0 0 + 17 18 1 0 0 0 + 18 19 1 0 0 0 + 19 20 2 0 0 0 + 19 36 1 0 0 0 + 20 21 1 0 0 0 + 21 22 1 0 0 0 + 21 37 1 0 0 0 + 22 23 1 0 0 0 + 23 24 1 0 0 0 + 24 25 1 0 0 0 + 25 26 1 0 0 0 + 25 39 1 0 0 0 + 26 27 1 0 0 0 + 27 28 2 0 0 0 + 27 32 1 0 0 0 + 28 29 1 0 0 0 + 29 30 1 0 0 0 + 30 31 2 0 0 0 + 31 32 1 0 0 0 + 5 41 1 0 0 0 + 10 42 1 0 0 0 + 11 43 1 0 0 0 + 11 44 1 0 0 0 +M END +> +62.20781910,64.30415179,-178.11010172,-58.10081097,7.54113525,-68.17322223 + +> +67.48601327,-169.27579335,2.88060764,-176.09387410,-63.63147672,120.70739357 +35.39014364,5.88426981,23.71740651,-1.24154136,-1.19338794,2.37044843 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-26.0347 + +> +-6.22447 + +> +1 + +> +-0.587536 + +> +0.254651 + +> +5 + +> +-15.9001 + +> +-0.155612 + +> +-12.0806 + +> +-10.6731 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-6.74403 + +> +7.09596 + +> +-0.302015 + +> +0 + +> +0 + +> +0 + +> +-7.72963 + +> +0 + +> +0.548039 + +> +-1.94298 + +> +-1.39751 + +> +-0.193241 + +> +40 + +> +-0.650867 + +$$$$ +L_1YET + rDOCK(R) 3D +libRbt.so/2021.1/901 2021/07/19 + 44 45 0 0 0 0 0 0 0 0999 V2000 + 38.2688 9.8717 19.8904 O 0 0 0 0 0 0 + 33.4581 12.7312 23.4567 O 0 0 0 0 0 0 + 31.3110 10.9968 23.6158 O 0 0 0 0 0 0 + 30.0023 10.6063 25.4633 O 0 0 0 0 0 0 + 32.9431 5.5335 27.9811 O 0 0 0 0 0 0 + 35.4846 6.8534 28.4512 O 0 0 0 0 0 0 + 34.4780 4.2448 23.8023 O 0 0 0 0 0 0 + 33.4398 5.1596 21.4587 O 0 0 0 0 0 0 + 38.1789 7.0784 22.7339 O 0 0 0 0 0 0 + 37.1751 7.9773 20.4710 N 0 0 0 0 0 0 + 29.1138 11.1640 23.4591 N 0 0 0 0 0 0 + 37.6918 9.2607 20.7572 C 0 0 0 0 0 0 + 37.5833 9.7815 22.1579 C 0 0 0 0 0 0 + 36.3553 9.9836 22.7026 C 0 0 0 0 0 0 + 36.0986 10.4858 24.0490 C 0 0 0 0 0 0 + 34.9496 11.0493 24.4767 C 0 0 0 0 0 0 + 33.7036 11.2885 23.6986 C 0 0 0 0 0 0 + 32.4069 10.7068 24.4195 C 0 0 0 0 0 0 + 32.4768 9.0930 24.6678 C 0 0 0 0 0 0 + 32.3581 8.5992 25.8905 C 0 0 0 0 0 0 + 32.3445 7.1636 26.3249 C 0 0 0 0 0 0 + 33.2301 6.8851 27.5499 C 0 0 0 0 0 0 + 34.7193 7.0514 27.2432 C 0 0 0 0 0 0 + 35.2493 6.0448 26.2262 C 0 0 0 0 0 0 + 36.7409 6.1952 25.8405 C 0 0 0 0 0 0 + 37.1540 5.3015 24.6206 C 0 0 0 0 0 0 + 36.4055 5.6568 23.3692 C 0 0 0 0 0 0 + 35.2067 5.1960 22.9960 C 0 0 0 0 0 0 + 34.5414 5.6162 21.7484 C 0 0 0 0 0 0 + 35.2047 6.5836 20.8695 C 0 0 0 0 0 0 + 36.4030 7.0688 21.1897 C 0 0 0 0 0 0 + 37.0699 6.6284 22.4543 C 0 0 0 0 0 0 + 38.8803 10.0733 22.8458 C 0 0 0 0 0 0 + 33.4075 13.5750 24.6615 C 0 0 0 0 0 0 + 30.1221 10.8942 24.2961 C 0 0 0 0 0 0 + 32.6363 8.2297 23.4144 C 0 0 0 0 0 0 + 30.8737 6.8163 26.6447 C 0 0 0 0 0 0 + 35.3440 7.9499 29.4079 C 0 0 0 0 0 0 + 37.0655 7.6425 25.6094 C 0 0 0 0 0 0 + 34.9342 2.9250 24.1346 C 0 0 0 0 0 0 + 33.5160 5.3070 28.8066 H 0 0 0 0 0 0 + 37.4226 7.6420 19.5291 H 0 0 0 0 0 0 + 29.3100 11.4010 22.4760 H 0 0 0 0 0 0 + 28.1415 11.1348 23.7978 H 0 0 0 0 0 0 + 1 12 2 0 0 0 + 2 17 1 0 0 0 + 2 34 1 0 0 0 + 3 18 1 0 0 0 + 3 35 1 0 0 0 + 4 35 2 0 0 0 + 5 22 1 0 0 0 + 6 23 1 0 0 0 + 6 38 1 0 0 0 + 7 28 1 0 0 0 + 7 40 1 0 0 0 + 8 29 2 0 0 0 + 9 32 2 0 0 0 + 10 12 1 0 0 0 + 10 31 1 0 0 0 + 11 35 1 0 0 0 + 12 13 1 0 0 0 + 13 14 2 0 0 0 + 13 33 1 0 0 0 + 14 15 1 0 0 0 + 15 16 2 0 0 0 + 16 17 1 0 0 0 + 17 18 1 0 0 0 + 18 19 1 0 0 0 + 19 20 2 0 0 0 + 19 36 1 0 0 0 + 20 21 1 0 0 0 + 21 22 1 0 0 0 + 21 37 1 0 0 0 + 22 23 1 0 0 0 + 23 24 1 0 0 0 + 24 25 1 0 0 0 + 25 26 1 0 0 0 + 25 39 1 0 0 0 + 26 27 1 0 0 0 + 27 28 2 0 0 0 + 27 32 1 0 0 0 + 28 29 1 0 0 0 + 29 30 1 0 0 0 + 30 31 2 0 0 0 + 31 32 1 0 0 0 + 5 41 1 0 0 0 + 10 42 1 0 0 0 + 11 43 1 0 0 0 + 11 44 1 0 0 0 +M END +> +62.79171791,-58.85233332,54.54316359,105.51681679,7.40565879,-68.14090489 + +> +-55.71910518,-162.44118539,1.00360198,-179.77395726,-71.53147779,-61.45481770 +34.57812587,8.15701091,24.17083266,-0.17685013,0.65515812,-0.58756756 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-44.6051 + +> +-25.1088 + +> +1 + +> +-2.34708 + +> +0.00055535 + +> +5 + +> +-27.5316 + +> +-0.627721 + +> +-10.8125 + +> +-9.4007 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-6.11216 + +> +7.09596 + +> +-0.270313 + +> +0 + +> +0 + +> +0 + +> +-8.6837 + +> +0 + +> +3.63459 + +> +-2.86954 + +> +-0.744579 + +> +-0.217093 + +> +40 + +> +-1.11513 + +$$$$ +L_1YET + rDOCK(R) 3D +libRbt.so/2021.1/901 2021/07/19 + 44 45 0 0 0 0 0 0 0 0999 V2000 + 38.2427 10.1933 20.2435 O 0 0 0 0 0 0 + 33.4678 12.8906 23.9802 O 0 0 0 0 0 0 + 31.2940 11.1828 24.0242 O 0 0 0 0 0 0 + 29.9678 10.6293 25.8168 O 0 0 0 0 0 0 + 32.8322 5.4249 28.0302 O 0 0 0 0 0 0 + 35.3924 6.6725 28.5879 O 0 0 0 0 0 0 + 34.3572 4.3848 23.7791 O 0 0 0 0 0 0 + 33.3386 5.4648 21.4980 O 0 0 0 0 0 0 + 38.1034 7.2241 22.9007 O 0 0 0 0 0 0 + 37.1187 8.2824 20.6992 N 0 0 0 0 0 0 + 29.0951 11.2567 23.8263 N 0 0 0 0 0 0 + 37.6543 9.5366 21.0683 C 0 0 0 0 0 0 + 37.5505 9.9677 22.4995 C 0 0 0 0 0 0 + 36.3244 10.1530 23.0544 C 0 0 0 0 0 0 + 36.0723 10.5713 24.4301 C 0 0 0 0 0 0 + 34.9310 11.1236 24.8917 C 0 0 0 0 0 0 + 33.6906 11.4317 24.1289 C 0 0 0 0 0 0 + 32.3834 10.8248 24.8091 C 0 0 0 0 0 0 + 32.4282 9.1974 24.9528 C 0 0 0 0 0 0 + 32.2991 8.6277 26.1409 C 0 0 0 0 0 0 + 32.2625 7.1674 26.4818 C 0 0 0 0 0 0 + 33.1409 6.7969 27.6875 C 0 0 0 0 0 0 + 34.6331 6.9598 27.3942 C 0 0 0 0 0 0 + 35.1502 6.0128 26.3151 C 0 0 0 0 0 0 + 36.6447 6.1647 25.9419 C 0 0 0 0 0 0 + 37.0470 5.3453 24.6675 C 0 0 0 0 0 0 + 36.3069 5.7921 23.4406 C 0 0 0 0 0 0 + 35.1022 5.3747 23.0369 C 0 0 0 0 0 0 + 34.4463 5.8847 21.8180 C 0 0 0 0 0 0 + 35.1264 6.8965 21.0043 C 0 0 0 0 0 0 + 36.3312 7.3415 21.3568 C 0 0 0 0 0 0 + 36.9883 6.8102 22.5912 C 0 0 0 0 0 0 + 38.8502 10.1945 23.2066 C 0 0 0 0 0 0 + 32.6873 13.2942 22.7995 C 0 0 0 0 0 0 + 30.0977 10.9873 24.6702 C 0 0 0 0 0 0 + 32.5774 8.4144 23.6466 C 0 0 0 0 0 0 + 30.7858 6.8229 26.7766 C 0 0 0 0 0 0 + 35.2902 7.7212 29.6015 C 0 0 0 0 0 0 + 36.9919 7.6188 25.8051 C 0 0 0 0 0 0 + 34.6874 2.9900 23.8549 C 0 0 0 0 0 0 + 33.3763 5.1469 28.8595 H 0 0 0 0 0 0 + 37.3633 8.0048 19.7379 H 0 0 0 0 0 0 + 29.2998 11.5572 22.8625 H 0 0 0 0 0 0 + 28.1185 11.1637 24.1403 H 0 0 0 0 0 0 + 1 12 2 0 0 0 + 2 17 1 0 0 0 + 2 34 1 0 0 0 + 3 18 1 0 0 0 + 3 35 1 0 0 0 + 4 35 2 0 0 0 + 5 22 1 0 0 0 + 6 23 1 0 0 0 + 6 38 1 0 0 0 + 7 28 1 0 0 0 + 7 40 1 0 0 0 + 8 29 2 0 0 0 + 9 32 2 0 0 0 + 10 12 1 0 0 0 + 10 31 1 0 0 0 + 11 35 1 0 0 0 + 12 13 1 0 0 0 + 13 14 2 0 0 0 + 13 33 1 0 0 0 + 14 15 1 0 0 0 + 15 16 2 0 0 0 + 16 17 1 0 0 0 + 17 18 1 0 0 0 + 18 19 1 0 0 0 + 19 20 2 0 0 0 + 19 36 1 0 0 0 + 20 21 1 0 0 0 + 21 22 1 0 0 0 + 21 37 1 0 0 0 + 22 23 1 0 0 0 + 23 24 1 0 0 0 + 24 25 1 0 0 0 + 25 26 1 0 0 0 + 25 39 1 0 0 0 + 26 27 1 0 0 0 + 27 28 2 0 0 0 + 27 32 1 0 0 0 + 28 29 1 0 0 0 + 29 30 1 0 0 0 + 30 31 2 0 0 0 + 31 32 1 0 0 0 + 5 41 1 0 0 0 + 10 42 1 0 0 0 + 11 43 1 0 0 0 + 11 44 1 0 0 0 +M END +> +62.81267260,-58.15417092,-65.74127259,-143.34368950,-176.45018893,-68.37175072 + +> +153.35565991,-165.68803831,4.53544200,-177.88887697,-72.81258653,-71.55973605 +34.49360084,8.24525559,24.32646478,-0.15166548,0.62652087,-0.58883898 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-45.7995 + +> +-26.5214 + +> +1 + +> +-2.73453 + +> +0 + +> +5 + +> +-27.624 + +> +-0.663034 + +> +-10.3214 + +> +-6.0985 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-7.27218 + +> +7.09596 + +> +-0.258036 + +> +0 + +> +0 + +> +0 + +> +-8.95671 + +> +0 + +> +2.91825 + +> +-2.86902 + +> +-0.661176 + +> +-0.223918 + +> +40 + +> +-1.14499 + +$$$$ +L_1YET + rDOCK(R) 3D +libRbt.so/2021.1/901 2021/07/19 + 44 45 0 0 0 0 0 0 0 0999 V2000 + 38.2479 10.2021 20.1714 O 0 0 0 0 0 0 + 33.4847 12.9092 23.9159 O 0 0 0 0 0 0 + 31.3082 11.2051 23.9650 O 0 0 0 0 0 0 + 29.9857 10.6544 25.7612 O 0 0 0 0 0 0 + 32.8446 5.4468 27.9712 O 0 0 0 0 0 0 + 35.4080 6.6905 28.5233 O 0 0 0 0 0 0 + 34.3597 4.4020 23.7177 O 0 0 0 0 0 0 + 33.3384 5.4824 21.4379 O 0 0 0 0 0 0 + 38.1089 7.2346 22.8306 O 0 0 0 0 0 0 + 37.1217 8.2934 20.6303 N 0 0 0 0 0 0 + 29.1095 11.3195 23.7844 N 0 0 0 0 0 0 + 37.6600 9.5469 20.9977 C 0 0 0 0 0 0 + 37.5597 9.9788 22.4289 C 0 0 0 0 0 0 + 36.3350 10.1665 22.9861 C 0 0 0 0 0 0 + 36.0862 10.5859 24.3620 C 0 0 0 0 0 0 + 34.9467 11.1404 24.8255 C 0 0 0 0 0 0 + 33.7054 11.4500 24.0649 C 0 0 0 0 0 0 + 32.3985 10.8457 24.7480 C 0 0 0 0 0 0 + 32.4409 9.2183 24.8924 C 0 0 0 0 0 0 + 32.3131 8.6495 26.0812 C 0 0 0 0 0 0 + 32.2748 7.1894 26.4229 C 0 0 0 0 0 0 + 33.1549 6.8182 27.6271 C 0 0 0 0 0 0 + 34.6468 6.9784 27.3308 C 0 0 0 0 0 0 + 35.1602 6.0299 26.2513 C 0 0 0 0 0 0 + 36.6543 6.1792 25.8751 C 0 0 0 0 0 0 + 37.0527 5.3585 24.6004 C 0 0 0 0 0 0 + 36.3111 5.8058 23.3746 C 0 0 0 0 0 0 + 35.1049 5.3902 22.9734 C 0 0 0 0 0 0 + 34.4475 5.9006 21.7556 C 0 0 0 0 0 0 + 35.1277 6.9109 20.9400 C 0 0 0 0 0 0 + 36.3338 7.3541 21.2899 C 0 0 0 0 0 0 + 36.9924 6.8224 22.5234 C 0 0 0 0 0 0 + 38.8611 10.2039 23.1334 C 0 0 0 0 0 0 + 32.6607 13.3100 22.7641 C 0 0 0 0 0 0 + 30.1134 11.0231 24.6177 C 0 0 0 0 0 0 + 32.5863 8.4344 23.5864 C 0 0 0 0 0 0 + 30.7981 6.8475 26.7207 C 0 0 0 0 0 0 + 35.3649 7.7700 29.5083 C 0 0 0 0 0 0 + 37.0036 7.6327 25.7369 C 0 0 0 0 0 0 + 34.7864 3.0517 23.9521 C 0 0 0 0 0 0 + 33.3927 5.1671 28.7972 H 0 0 0 0 0 0 + 37.3639 8.0148 19.6687 H 0 0 0 0 0 0 + 29.3124 11.6272 22.8226 H 0 0 0 0 0 0 + 28.1337 11.2399 24.1047 H 0 0 0 0 0 0 + 1 12 2 0 0 0 + 2 17 1 0 0 0 + 2 34 1 0 0 0 + 3 18 1 0 0 0 + 3 35 1 0 0 0 + 4 35 2 0 0 0 + 5 22 1 0 0 0 + 6 23 1 0 0 0 + 6 38 1 0 0 0 + 7 28 1 0 0 0 + 7 40 1 0 0 0 + 8 29 2 0 0 0 + 9 32 2 0 0 0 + 10 12 1 0 0 0 + 10 31 1 0 0 0 + 11 35 1 0 0 0 + 12 13 1 0 0 0 + 13 14 2 0 0 0 + 13 33 1 0 0 0 + 14 15 1 0 0 0 + 15 16 2 0 0 0 + 16 17 1 0 0 0 + 17 18 1 0 0 0 + 18 19 1 0 0 0 + 19 20 2 0 0 0 + 19 36 1 0 0 0 + 20 21 1 0 0 0 + 21 22 1 0 0 0 + 21 37 1 0 0 0 + 22 23 1 0 0 0 + 23 24 1 0 0 0 + 24 25 1 0 0 0 + 25 26 1 0 0 0 + 25 39 1 0 0 0 + 26 27 1 0 0 0 + 27 28 2 0 0 0 + 27 32 1 0 0 0 + 28 29 1 0 0 0 + 29 30 1 0 0 0 + 30 31 2 0 0 0 + 31 32 1 0 0 0 + 5 41 1 0 0 0 + 10 42 1 0 0 0 + 11 43 1 0 0 0 + 11 44 1 0 0 0 +M END +> +61.77681755,179.71524812,-65.74639953,60.00961258,7.79230598,63.31884815 + +> +155.52139670,-165.14608221,3.26862973,-178.11893874,-75.75911891,-62.18199427 +34.50656668,8.26568170,24.26741162,-0.16349640,0.62688205,-0.59402855 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-40.7907 + +> +-24.1639 + +> +1 + +> +-2.09501 + +> +0.00203538 + +> +5 + +> +-27.451 + +> +-0.604097 + +> +-10.2781 + +> +-6.68432 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-6.93596 + +> +7.09596 + +> +-0.256953 + +> +0 + +> +0 + +> +0 + +> +-6.34872 + +> +0 + +> +0.247655 + +> +-1.03953 + +> +-2.93814 + +> +-0.158718 + +> +40 + +> +-1.01977 + +$$$$ \ No newline at end of file diff --git a/rdock-utils/tests/fixtures/sdrmsd/ref.sdf b/rdock-utils/tests/fixtures/sdrmsd/ref.sdf new file mode 100644 index 00000000..30d3c693 --- /dev/null +++ b/rdock-utils/tests/fixtures/sdrmsd/ref.sdf @@ -0,0 +1,210 @@ +L_1YET + rDOCK(R) 3D +libRbt.so/2021.1/901 2021/07/19 + 44 45 0 0 0 0 0 0 0 0999 V2000 + 38.1989 10.1357 20.2072 O 0 0 0 0 0 0 + 33.5670 12.9485 24.0376 O 0 0 0 0 0 0 + 31.3419 11.3089 24.1011 O 0 0 0 0 0 0 + 30.0189 10.7150 25.8831 O 0 0 0 0 0 0 + 32.7595 5.4724 28.0373 O 0 0 0 0 0 0 + 35.3654 6.6351 28.5658 O 0 0 0 0 0 0 + 34.1874 4.4213 23.7553 O 0 0 0 0 0 0 + 33.1689 5.5516 21.4986 O 0 0 0 0 0 0 + 38.0068 7.1500 22.8426 O 0 0 0 0 0 0 + 37.0228 8.2570 20.6648 N 0 0 0 0 0 0 + 29.1427 11.3996 23.9130 N 0 0 0 0 0 0 + 37.6027 9.4907 21.0357 C 0 0 0 0 0 0 + 37.5339 9.9127 22.4717 C 0 0 0 0 0 0 + 36.3226 10.1314 23.0466 C 0 0 0 0 0 0 + 36.1043 10.5457 24.4293 C 0 0 0 0 0 0 + 34.9879 11.1294 24.9126 C 0 0 0 0 0 0 + 33.7464 11.4822 24.1713 C 0 0 0 0 0 0 + 32.4313 10.9106 24.8664 C 0 0 0 0 0 0 + 32.4273 9.2814 24.9964 C 0 0 0 0 0 0 + 32.2983 8.7060 26.1819 C 0 0 0 0 0 0 + 32.2213 7.2448 26.5116 C 0 0 0 0 0 0 + 33.1056 6.8370 27.7008 C 0 0 0 0 0 0 + 34.5977 6.9558 27.3862 C 0 0 0 0 0 0 + 35.0687 6.0023 26.2918 C 0 0 0 0 0 0 + 36.5615 6.1109 25.8971 C 0 0 0 0 0 0 + 36.9188 5.2901 24.6103 C 0 0 0 0 0 0 + 36.1748 5.7700 23.3983 C 0 0 0 0 0 0 + 34.9517 5.3938 23.0097 C 0 0 0 0 0 0 + 34.2939 5.9341 21.8051 C 0 0 0 0 0 0 + 34.9930 6.9311 20.9891 C 0 0 0 0 0 0 + 36.2162 7.3355 21.3268 C 0 0 0 0 0 0 + 36.8748 6.7736 22.5468 C 0 0 0 0 0 0 + 38.8504 10.0931 23.1607 C 0 0 0 0 0 0 + 32.7212 13.3826 22.9140 C 0 0 0 0 0 0 + 30.1468 11.1026 24.7459 C 0 0 0 0 0 0 + 32.5325 8.5052 23.6819 C 0 0 0 0 0 0 + 30.7392 6.9438 26.8261 C 0 0 0 0 0 0 + 35.2803 7.6605 29.6045 C 0 0 0 0 0 0 + 36.9518 7.5546 25.7666 C 0 0 0 0 0 0 + 34.5278 3.0335 23.8916 C 0 0 0 0 0 0 + 33.2891 5.1788 28.8705 H 0 0 0 0 0 0 + 37.2441 7.9800 19.6977 H 0 0 0 0 0 0 + 29.3458 11.7243 22.9568 H 0 0 0 0 0 0 + 28.1668 11.3033 24.2279 H 0 0 0 0 0 0 + 1 12 2 0 0 0 + 2 17 1 0 0 0 + 2 34 1 0 0 0 + 3 18 1 0 0 0 + 3 35 1 0 0 0 + 4 35 2 0 0 0 + 5 22 1 0 0 0 + 6 23 1 0 0 0 + 6 38 1 0 0 0 + 7 28 1 0 0 0 + 7 40 1 0 0 0 + 8 29 2 0 0 0 + 9 32 2 0 0 0 + 10 12 1 0 0 0 + 10 31 1 0 0 0 + 11 35 1 0 0 0 + 12 13 1 0 0 0 + 13 14 2 0 0 0 + 13 33 1 0 0 0 + 14 15 1 0 0 0 + 15 16 2 0 0 0 + 16 17 1 0 0 0 + 17 18 1 0 0 0 + 18 19 1 0 0 0 + 19 20 2 0 0 0 + 19 36 1 0 0 0 + 20 21 1 0 0 0 + 21 22 1 0 0 0 + 21 37 1 0 0 0 + 22 23 1 0 0 0 + 23 24 1 0 0 0 + 24 25 1 0 0 0 + 25 26 1 0 0 0 + 25 39 1 0 0 0 + 26 27 1 0 0 0 + 27 28 2 0 0 0 + 27 32 1 0 0 0 + 28 29 1 0 0 0 + 29 30 1 0 0 0 + 30 31 2 0 0 0 + 31 32 1 0 0 0 + 5 41 1 0 0 0 + 10 42 1 0 0 0 + 11 43 1 0 0 0 + 11 44 1 0 0 0 +M END +> +64.12540954,-57.65322675,53.34742205,-57.14100212,-176.35502015,-68.63555890 + +> +156.53968631,-167.77671564,5.21130411,-176.44975611,-71.16602861,-66.94133215 +34.45104295,8.26640344,24.33299797,-0.16161449,0.65294462,-0.57169818 + +> +L_1YET + +> +-5.39007e+08 + +> +/workspaces/rDock/perf/23.12.17962e/tests/data + +> +rbdock ($Id: //depot/dev/client3/rdock/2021.1/src/exe/rbdock.cxx#4 $) + +> +libRbt.so (2021.1, Build901 2021/07/19) + +> +../../data/scripts/dock.prm + +> +1YET_test.prm + +> +-44.8298 + +> +-23.9918 + +> +1 + +> +-2.0203 + +> +0 + +> +5 + +> +-27.5227 + +> +-0.599794 + +> +-10.2712 + +> +-7.26837 + +> +15.3889 + +> +0 + +> +0 + +> +0 + +> +0 + +> +-6.63705 + +> +7.09596 + +> +-0.256781 + +> +0 + +> +0 + +> +0 + +> +-10.5668 + +> +0 + +> +0.627995 + +> +-2.86952 + +> +-1.12445 + +> +-0.26417 + +> +40 + +> +-1.12075 + +$$$$ diff --git a/rdock-utils/tests/sdrmsd/__init__.py b/rdock-utils/tests/sdrmsd/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/rdock-utils/tests/sdrmsd/conftest.py b/rdock-utils/tests/sdrmsd/conftest.py new file mode 100644 index 00000000..25d9b4b5 --- /dev/null +++ b/rdock-utils/tests/sdrmsd/conftest.py @@ -0,0 +1,29 @@ +import pytest + +from ..conftest import FIXTURES_FOLDER + +SDRMSD_FIXTURES_FOLDER = FIXTURES_FOLDER / "sdrmsd" +REF_FILE = str(SDRMSD_FIXTURES_FOLDER / "ref.sdf") +INPUT_FILE = str(SDRMSD_FIXTURES_FOLDER / "input.sdf") + + +@pytest.fixture(scope="session") +def aligned_nofit_filename() -> str: + return str(SDRMSD_FIXTURES_FOLDER / "aligned-nofit.sdf") + + +@pytest.fixture(scope="session") +def aligned_fit_filename() -> str: + return str(SDRMSD_FIXTURES_FOLDER / "aligned-fit.sdf") + + +@pytest.fixture(scope="session") +def aligned_molecules_raw_data(aligned_nofit_filename: str) -> bytes: + with open(aligned_nofit_filename, "rb") as f: + return f.read() + + +@pytest.fixture(scope="session") +def aligned_fit_molecules_raw_data(aligned_fit_filename: str) -> bytes: + with open(aligned_fit_filename, "rb") as f: + return f.read() diff --git a/rdock-utils/tests/sdrmsd/test_integration.py b/rdock-utils/tests/sdrmsd/test_integration.py new file mode 100644 index 00000000..defa2350 --- /dev/null +++ b/rdock-utils/tests/sdrmsd/test_integration.py @@ -0,0 +1,77 @@ +from tempfile import NamedTemporaryFile + +import pytest +from openbabel import pybel + +from rdock_utils.sdrmsd.main import main as sdrmsd_main +from rdock_utils.sdrmsd_original import main as sdrmsd3_main +from tests.sdrmsd.conftest import INPUT_FILE, REF_FILE + +parametrize_main = pytest.mark.parametrize( + "main", + [ + pytest.param(sdrmsd_main, id="Improved version (Python 3.12)"), + pytest.param(sdrmsd3_main, id="Original version (Python 3)"), + ], +) + + +@parametrize_main +def test_do_nothing(main): + with pytest.raises(SystemExit): + main() + + +@parametrize_main +def test_basic_run(main): + args = [REF_FILE, INPUT_FILE] + main(args) + + +@parametrize_main +def test_no_fit_resulsts(main, aligned_nofit_filename: str, capsys: pytest.CaptureFixture[str]): + with NamedTemporaryFile() as tmp: + args = ["-o", tmp.name, REF_FILE, INPUT_FILE] + main(args) + assert compare_sdf_files(tmp.name, aligned_nofit_filename) + assert capsys.readouterr().out == "POSE\tRMSD_NOFIT\n1\t0.00\n2 6.69\n3 0.48\n4 0.12\n5 0.14\n" + + +@parametrize_main +def test_fit_resulsts(main, aligned_fit_filename: str): + with NamedTemporaryFile() as tmp: + args = ["-f", "-o", tmp.name, REF_FILE, INPUT_FILE] + main(args) + assert compare_sdf_files(tmp.name, aligned_fit_filename) + + +def atoms_are_equal(atom_1: pybel.Atom, atom_2: pybel.Atom) -> bool: + if atom_1.atomicnum != atom_2.atomicnum: + return False + + if atom_1.coords != atom_2.coords: + return False + + if atom_1.formalcharge != atom_2.formalcharge: + return False + + if atom_1.type != atom_2.type: + return False + + return True + + +def molecules_are_equal(molecule_1: pybel.Molecule, molecule_2: pybel.Molecule) -> bool: + molecule_1_data = {k: v for k, v in molecule_1.data.items()} + molecule_2_data = {k: v for k, v in molecule_2.data.items()} + + if molecule_1_data != molecule_2_data: + return False + + return all(atoms_are_equal(atom_1, atom_2) for atom_1, atom_2 in zip(molecule_1.atoms, molecule_2.atoms)) + + +def compare_sdf_files(filename_1: str, filename_2: str) -> bool: + molecules_1 = pybel.readfile("sdf", filename_1) + molecules_2 = pybel.readfile("sdf", filename_2) + return all(molecules_are_equal(molecule_1, molecule_2) for molecule_1, molecule_2 in zip(molecules_1, molecules_2))