pemsley / coot

Software for macromolecular model-building
http://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/
GNU General Public License v3.0
121 stars 46 forks source link

RDKit Atom::setMass() has been removed #9

Closed wojdyr closed 9 years ago

wojdyr commented 9 years ago

When building with RDKit 2015_03_1 I get:

/home/wojdyr/checkout/coot-0.8.2/lidia-core/rdkit-interface.cc: In function ‘RDKit::RWMol coot::rdkit_mol(mmdb::Residue*, const coot::dictionary_residue_restraints_t&, const string&, bool)’:
/home/wojdyr/checkout/coot-0.8.2/lidia-core/rdkit-interface.cc:183:16: error: ‘class RDKit::Atom’ has no member named ‘setMass’
      rdkit_at->setMass(tbl->getAtomicWeight(atomic_number));
                ^
/home/wojdyr/checkout/coot-0.8.2/lidia-core/rdkit-interface.cc: In function ‘RDKit::RWMol coot::rdkit_mol(const coot::dictionary_residue_restraints_t&)’:
/home/wojdyr/checkout/coot-0.8.2/lidia-core/rdkit-interface.cc:604:7: error: ‘class RDKit::Atom’ has no member named ‘setMass’
   at->setMass(tbl->getAtomicWeight(atomic_number));

from RDKit changelog:

wojdyr commented 9 years ago

we've patched it for ccp4 build

diff --git a/lidia-core/rdkit-interface.cc b/lidia-core/rdkit-interface.cc
index 665ed81..c4caa5c 100644
--- a/lidia-core/rdkit-interface.cc
+++ b/lidia-core/rdkit-interface.cc
@@ -180,7 +180,7 @@ coot::rdkit_mol(mmdb::Residue *residue_p,
               coot::util::capitalise(coot::util::remove_leading_spaces(at->element));
            int atomic_number = tbl->getAtomicNumber(ele_capped);
            rdkit_at->setAtomicNum(atomic_number);
-           rdkit_at->setMass(tbl->getAtomicWeight(atomic_number));
+           rdkit_at->setIsotope(0);
            rdkit_at->setProp("name", atom_name);

            // set the valence from they type energy.  Abstract?
@@ -601,7 +601,7 @@ coot::rdkit_mol(const coot::dictionary_residue_restraints_t &r) {
            coot::util::capitalise(coot::util::remove_leading_spaces(r.atom_info[iat].type_symbol));
         int atomic_number = tbl->getAtomicNumber(ele_capped);
         at->setAtomicNum(atomic_number);
-        at->setMass(tbl->getAtomicWeight(atomic_number));
+        at->setIsotope(0);
         at->setProp("name", r.atom_info[iat].atom_id);

         // set the chirality (if this atom is chiral).
pemsley commented 9 years ago

OK, noted (Bill Scott informed me of this problem some time ago). Why don't you see a similar problem in lbg/libg.cc? Or do you?

wojdyr commented 9 years ago

yes, the patch above is not complete, i've changed it also in lbg.cc

pemsley commented 9 years ago

Fixed.