mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-04 21:54:27 +08:00
* Fixes #4996 also switches to using the GraphMol version of catch_main.cpp so builds are faster * Fixes #4998 we should probably discuss this one * compare with previous results
28 lines
714 B
C++
28 lines
714 B
C++
//
|
|
// Copyright (C) 2020 Schrödinger, LLC
|
|
//
|
|
// @@ All Rights Reserved @@
|
|
// This file is part of the RDKit.
|
|
// The contents are covered by the terms of the BSD license
|
|
// which is included in the file license.txt, found at the root
|
|
// of the RDKit source tree.
|
|
//
|
|
|
|
#include "Rule1a.h"
|
|
#include "../Mancude.h"
|
|
|
|
namespace RDKit {
|
|
namespace CIPLabeler {
|
|
|
|
Rule1a::Rule1a() = default;
|
|
|
|
// CIP Rule 1a: Higher atomic number precedes lower.
|
|
int Rule1a::compare(const Edge *a, const Edge *b) const {
|
|
const auto afrac = a->getEnd()->getAtomicNumFraction();
|
|
const auto bfrac = b->getEnd()->getAtomicNumFraction();
|
|
|
|
return three_way_comparison(afrac, bfrac);
|
|
}
|
|
|
|
} // namespace CIPLabeler
|
|
} // namespace RDKit
|