Issue converting Structure to Smile string

User 03592810fa

07-07-2014 11:03:42

We have a script to generate smile string from structure:


$request = $client->post('util/calculate/stringMolExport', null, json_encode(array(


      "structure" => STRUCTURE HERE, 


      "parameters" => 'smiles'


    )));


When a SDF file with large number of records is provided as input to this script, it pick every every record in SDF and iterative mode generate smile string. But some time it display Guzzle error after certain number of records. This is random behavior.


Any views?

ChemAxon 2cd598e7ad

08-07-2014 10:08:28

Hi deepaksh,

I'm not sure about understanding the problem, but if it is that some of the sdf files can not be exported to smiles (or imported from sdf), please attach that part and we will investigate it. Also it can be useful if you could provide the code that converts the sdf file into smiles strings.


Regards,
Domi

User 23ba1704ca

08-07-2014 13:42:55

Hello Domi


Let me explain you the problem we are facing:


 


1. We are importing structures along with some meta data and other attributes into the database using the REST web services.


2. Since the SD file does not have SMILE strings, we are generating SMILE strings on the fly, so that the imported/generated database table is structure searchable.


3. While we are importing the SD file, there are certain structures that will return the SMILE string, the record will get added into the database table and the process will move on. However, the web service often returns error. There is no definite pattern. At times, it will stop at second record and on re-running the code, it will execute the second record and return error at the ninth record.


4. The function that is misbehaving is stringMolExport.


5. CODE EXCERPT:


      $client = new
Client($_SESSION['Settings']['DOMAIN_NAME'].'/webservices/rest-v0/');


       $request =
$client->post('util/calculate/stringMolExport', null, json_encode(array(


 


       "structure"
=> $structure,


      "parameters"
=> 'smiles'


  )));


 


6. DEBUG WINDOW EXCERPT:


C4H2Cl2N2


  cdxl130010051317142D


 


  8  8  0  0  0  0  0  0  0  0999 V2000


    0.0000    0.8250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    0.7145    0.4125    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


    0.7145   -0.4125    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0


    0.0000   -0.8250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


   -0.7145   -0.4125    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0


   -0.7145    0.4125    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


   -1.4289    0.8250    0.0000 Cl  0  0  0  0  0  0  0  0  0  0  0  0


    1.4289    0.8250    0.0000 Cl  0  0  0  0  0  0  0  0  0  0  0  0


  1  2  2  0        0


  2  3  1  0        0


  3  4  2  0        0


  4  5  1  0        0


  5  6  2  0        0


  1  6  1  0        0


  6  7  1  0        0


  2  8  1  0        0


M  END


Processed


Fatal error:  Uncaught exception 'Guzzle\Http\Exception\ServerErrorResponseException' with message 'Server error response [status code] 500 [reason phrase] Internal Server Error


http://deepak-pc:8180/webservices/rest-v0/util/calculate/stringMolExport' in D:\xampp\htdocs\package\class\vendor\guzzle\guzzle\src\Guzzle\Http\Exception\BadResponseException.php:44


Stack trace:


#0 D:\xampp\htdocs\package\class\vendor\guzzle\guzzle\src\Guzzle\Http\Message\Request.php(145): Guzzle\Http\Exception\BadResponseException::factory(Object(Guzzle\Http\Message\EntityEnclosingRequest), Object(Guzzle\Http\Message\Response))


#1 [internal function]: Guzzle\Http\Message\Request::onRequestError(Object(Guzzle\Common\Event))


#2 D:\xampp\htdocs\package\class\vendor\symfony\event-dispatcher\Symfony\Component\EventDispatcher\EventDispatcher.php(164): call_user_func(Array, Object(Guzzle\Common\Event))


#3 D:\xampp\htdocs\package\class\vendor\symfony\event-dispatcher\Symfony\Component\EventDispatcher\EventDispatcher.php(53): Symfony\Component\Eve in D:\xampp\htdocs\package\class\vendor\guzzle\guzzle\src\Guzzle\Http\Exception\BadResponseException.php on line 44


 


 


 


Domi, Please note that when we passed the same structure (mentioned in the DEBUG WINDOW), manually on the webservice page, the stringMolExport function generated the SMILE string without any errors. Please refer to the attachment.


 


We are urgently looking for a solution here, since this problem is extremely critical. We have already spent two days arriving to a conclusion that our piece is code is not the culprit here, but there may be something wrong with the webservice.


I again implore you to please provide us with a solution ASAP.


 


Thanks


Ashish Dugar

User 23ba1704ca

08-07-2014 13:44:41

Hello Domi



Please feel free to get in touch with us on following cell numbers, if required:


 


Ashish Dugar  - +91 971 779 9491


Deepak Sihag - +91 982 870 0333


 


Thanks


Ashish

User 23ba1704ca

08-07-2014 16:55:22

Hello Domi


 


Just wondering, if you have an update on this issue.


 


Thanks


Ashish

ChemAxon 2cd598e7ad

10-07-2014 08:40:25

// Note: email conversation has happened corresponding the question. //