I was able to complete the .NET coding for a SMARTS pattern search within an 
input SMILES, and am wondering if the loop to check for SMARTS hits (below) in 
each vector element of maplist should start at 0 or 1? 

As an example, when using Thiophene's SMILES Cc1ccsc1 and the SMARTS pattern 
[sx2r5], there should be one hit, which does occur when i=1.  However, I am not 
sure if the loop need to start at i=0, so is each VectorInt inside a 
VectorVecInt zero-based?
        Dim OBConv As New OBConversion()
        OBConv.SetInFormat("smi")
        Dim Mol As New OBMol()
        OBConv.ReadString(Mol, "c1ccsc1")
        Dim sp As New OBSmartsPattern
        Dim bool As Boolean = sp.Init("[sx2r5]")
        bool =sp.Match(Mol)
        Dim maplist As New VectorVecInt
        Dim vlist As VectorInt
        Dim i As Integer
        maplist = sp.GetMapList()
        For Each vlist In maplist
            For i = 1 To vlist.Count
                MsgBox(i.ToString)
            Next
        Next
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to