new bond query type suggestion

User 870ab5b546

14-07-2006 17:41:52

Would you consider adding MolBond.DOUBLE_OR_TRIPLE to your bond query constants?

ChemAxon d76e6e95eb

14-07-2006 19:34:39

This generic bond type could be useful, however, it would not be compatible with the Molfile formats. All generic bond types in the bond type combo are currently Molfile compatible.


As a workaround =,# SMARTS expression means the same.

User 870ab5b546

16-07-2006 01:38:12

I need a parameter for MolBond.setType() that will import into an MRV file, so your suggestion won't help. Well, it's not terribly important.

ChemAxon d76e6e95eb

17-07-2006 11:42:28

We need some time to carefully examine and discuss the corresponding technical issues and some of the developers are out of the office at the moment. Please be patient, we will respond soon.

ChemAxon a3d59b832c

27-07-2006 10:07:59

Sorry for the late answer, I just arrived from holiday.
bobgr wrote:
... there are many reasons TO implement the change, not least of which is the ability to search for DOUBLE_OR_TRIPLE bonds. Don't you think many users will want to have that ability? I doubt anyone will complain about having the option; if they don't want it, they won't have to use it.
As Gyorgy mentioned earlier, this is already possible through the use of SMARTS bonds. You can draw this bond using the following way:





1. Open the More window


2. type C=,#C into the text box (quick explanation of smarts symbols: "=" means double bond. Comma means or and "#" means triple bond.)


3. click the SMARTS button


4. put down the bond


5. change the atom types to other than carbon and/or remove the aliphatic query property using the .a/A button of the More window.


(In SMARTS, uppercase C means aliphatic carbon, so the aliphatic query property may have to be removed)





These SMARTS bonds can be saved in formats smarts, cxsmarts and mrv.





I have tried to make a custom template from this, but there were problems with it. We will check this issue in the future, after the new Marvin release. In the future it is also possible to provide this template amongst the bond types in the GUI, we will discuss this here internally.


(So this functionality will not require a new constant. There are other other useful combinations using SMARTS bonds, like single or double or aromatic: C-,=,:C )





I will soon post how a bond can be set to double or aromatic using the API.





Best regards,


Szabolcs

ChemAxon a3d59b832c

27-07-2006 10:53:30

Hi Bob,





Please find attached a java program to illustrate how to use SMARTS bonds. It is a bit tricky, because you have to replace MolBond with a descendant QueryBond instance.





This is the output of the program when executed:


Code:
$ java test/DTBondTest


Result(smarts): [#6]=,#CC[#6]


Result(mrv): <?xml version="1.0" ?>


<MDocument>


  <MChemicalStruct>


    <molecule molID="m1">


      <atomArray


          atomID="a1 a2 a3 a4"


          elementType="C C C C"


          />


      <bondArray>


        <bond atomRefs2="a1 a2" order="1" queryType="Any"


              mrvQueryProps="str:=,#" />


        <bond atomRefs2="a2 a3" order="1" />


        <bond atomRefs2="a3 a4" order="1" />


      </bondArray>


    </molecule>


  </MChemicalStruct>


</MDocument>








Best regards,


Szabolcs