Hi,

On Tue, Jul 31, 2012 at 7:22 PM, Alessandro Nascimento
<al.s.nascime...@gmail.com> wrote:
> Hi OB folks,
> I am brand new to OpenBabel and I`m trying to learn how to use the
> conformerSearch in OB. However, I am finding some odd results and
> would like to hear from you about hints on how to generate multiple
> conformers using OB.
>
> Below there is a piece of my C++ code. The code compiles fine.
> However, I get a message indicating that my initial conformer does not
> pass the filter. I took a look in OB documentation about the filters
> in ConformerSearch and could not find clues on how to handle this
> situation.

You should minimize the molecule first.

> I am not sure if the problem is related to the molecule or
> to the file format (I am using a MOL2 file downloaded from ZINC).

The file format should not matter.

> So, some questions: The conformerSearch API requires a mol2 file
> with/without hydrogens? Can the filter parameters be changed?

It requires hydrogens since the forcefields need explicit hydrogens.

> Just to clarify, I also tried to use the WeightedRotorSearch and this
> method could not generate any conformer as well. Any clues?
>
> The output:
> Initial conformer does not pass filter!
> Initial conformer count: 0
> Generation #1  0
> Generation #2  NaN
> Generation #3  NaN
> Generation #4  NaN
> Generation #5  NaN
> Generation #6  NaN
> Generation #7  NaN
> Generation #8  NaN
> Generation #9  NaN
> Generation #10  NaN
> ..
>
> Code piece:
> #################################################################
>         OBconv = new OBConversion;
>         OBmol = new OBMol;
>
> // Supressing OpenBabel warning messages
>         messageHandler = new OBMessageHandler;
>         messageHandler->SetOutputLevel(obError);
>         OpenBabel::obErrorLog = *messageHandler;
>
>         OBconv->SetInAndOutFormats("mol2", "mol2");
>         bool file_read = OBconv->ReadFile(OBmol, molfile);
>         if (!file_read){
>                 printf("Could not open file %s for reading.\n", 
> molfile.c_str());
>                 exit(1);
>         }
>
> //Checking...
> //      printf("Number of atoms:  %d.\n", OBmol->NumAtoms());
> //      printf("Number of rotors: %d.\n", OBmol->NumRotors());
> //      printf("Number of Heavy atoms:  %d.\n", OBmol->NumHvyAtoms());
> //      printf("Total charge: %d.\n", OBmol->GetTotalCharge());
> //      printf("Automatic Partial Charge? %d\n",
> OBmol->HasPartialChargesPerceived());
>
>         double total=0.00;
>
>         FOR_ATOMS_OF_MOL(atom, OBmol){
>                 total+=atom->GetPartialCharge();
>         }
>         printf("Total charge: %5.2f\n", total);
>         OBmol->SetTotalCharge(int(total));
>         printf("OBMol charge: %d\n", OBmol->GetTotalCharge());
>
>         OBconf = new OBConformerSearch;
>         OBconf->Setup(*OBmol, 30, 5, 5, 25);
>         OBconf->Search();
>         OBconf->GetConformers(*OBmol);
>         printf("Number of conformers: %d.\n", OBmol->NumConformers());
>         OBmol->SetConformer(1);
>         OBconv->WriteFile(OBmol, "test.mol2");
>
> ##########################################################################
>
>
> --
> [ ]s
>
> --alessandro
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to