Improved ligand constraints. Created GenericConstraintTest for testing