Dear All,
I have run into a problem with regards to the way in which OBMol deals with
atom ids.
My code structure is as follows:
//Preparing the fragments
-load an amino acid library into separate OBMol objects.
-Delete (by index) the C(alpha)-C(beta) in each molecule to create two
fragments.
-separate out the useful side chain and non-useful backbone fragments into
separate OBMol objects with OBMol::Separate.
//Prepare the protein
-Load a protein from a mol2 file.
-delete (by index) a certain C(alpha)-C(beta)bond.
-separate out the protein with vacant side, from the sidechain with
OBMol::Separate
all of the above works just fine, however;
-create new OBMol object to hold protein
-add sidechain fragment to new OBMol object with += operator.
-bond sidechain to protein with OBBuilder::Connect
I have ran into a little trouble when trying to code a robust structure when it
comes to adding the sidechain from the fragment OBMol, to the protein OBMol
with regards to finding the atoms that I want to connect. The functions
getIdx() and getID() are pretty useless in this regard since they both get
changed/modified upon separate, copy constructor, += functions/operations etc
and hence its not possible to track the atoms in a robust way using these
values.
Nor is it robust to hold a pointer to each atom that I want to add/change from
the fragment and protein OBMol's respectively, since these pointers seem to
point to now-redundant atoms when creating other OBMol's and calling the copy
constructor.
I only have accurate knowledge of what the indexes/ids of each of the
(dis)connection atoms are from both the protein and the amino acid library
before any manipulations are done, since any manipulations seem to change both
of these values.
Why are both indexes and ids changed? I can understand indexes being mutable
however it makes no sense to me to create a structure for tracking atoms, but
to defunk it by changing/rewriting it upon manipulation!
Any help or advice to this problem would be much appreciated.
Kind Regards,
Nicholas
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel