I have a bunch of monomers in the form of SMILES string and I want to generate conformers from them.
At the moment, I am using RDKit to convert these SMILES strings to .sdf files, then using OpenBabel to generate conformers using OpenBabel's default genetic algorithm.
The problem with this method is that I am having to write these sdf files to disk using RDKit. Once that is done, I then separately run a OpenBabel command on my terminal to produce the low-energy conformers I want.
My question is, is there a way to write a python script that accepts SMILES strings, creates an sdf-like object, and then calls the genetic algorithm to go to work on the file and generate conformer file for me to use? I don't want to have the preliminary step of converting the SMILES string to sdf in my workflow.
The method I have right now works fine on my personal computer, but when I am accessing a remote cluster with memory constraints, I can't afford to use disk space by storing .sdf/.pdb/.mol files.
Any advice you have would be appreciated.
For reference, I am using this to create my conformers. Is there a python command in openbabel or pybel that I can use to generate conformers from that SMILES string?
The bash script I am using is:
#! /bin/bash obabel -:"CC(=C)C(=O)OCCN(C)C" -O test_.pdb --gen3D -d obabel test_.pdb -O test_op.pdb --conformer --nconf 30 --score rmsd --writeconformers rm test_.pdb