User Guide

Compare Equal is a package composed of two functions for comparison two molecules and checks if they are the same molecule. The package uses Chimera classes and its attributes, so, t is essential to have it installed. See how to install it in the section: How to install.

The main module is compare_equal.compare which contains the two main functions: compare_equal.compare.compare_pdb(), for comparing the molecules inside of two PDB files, and compare_equal.compare.compare_mol(), for comparing two ‘chimera.Molecule’ objects. These two functions can be imported directly with the package or, also, importing the module compare_equal.compare.

compare_equal.compare_pdb(pdb_1, pdb_2)

Receives the name (or path) of two PDB files and checks if both molecules are equals, in which case, it will return a True value.

Parameters:pdb_1, pdb_2 (str) – The paths from the current working directory to the PDB files to compare.
Returns:A True or False value depending if both PDB files are equal or not.
Return type:bool
compare_equal.compare_mol(mol_1, mol_2)

Receives two ‘chimera.Molecule’ objects and checks if both are equals, in which case, it will return a True value.

Parameters:mol_1, mol_2 (chimera.Molecule object) – The Python variables to compare with each other.
Returns:A True or False value depending if both molecules are equal or not.
Return type:bool
Raises:AssertionError – If one of the arguments is not a Chimera Molecule object.