Thank you Miro for your answer. Tha is in the spirit of we want to do, but
without writing an intermediate file. We think that all the conversions can
be done inside the code.
Marcos.
2017-05-22 16:06 GMT-03:00 Miro Moman <miromo...@gmail.com>:
> Quick and dirty workaround: Convert it to .xyz (removing the Hs if needed)
> then compute the atom types from that file and see what happens...
>
> On 22 May 2017 19:24, "Marcos Villarreal" <mvillarr...@unc.edu.ar> wrote:
>
>> Hello,
>>
>> For an application we are developing, we would like to get an atom typing
>> independent of the input format.
>> For example a mol2 with all Hydrogen atoms and a pdb without Hydrogens of
>> the same molecule (i.e. identical heavy atom coordinates) should get the
>> same atom types.
>> The attached program is our try in that direction, but unfortunately
>> without success. How could one get ride off all the input information and
>> let babel do all the new calculations of atom types?
>>
>> Thank you in advance.
>>
>>
>> int main(int argc,char **argv)
>> {
>>
>> OpenBabel::OBConversion conv;
>> OpenBabel::OBMol mol;
>> std::string filename;
>> filename = argv[1];
>>
>> conv.ReadFile(&mol,filename);
>>
>> mol.DeleteHydrogens();
>> mol.ConnectTheDots();
>> mol.PerceiveBondOrders();
>>
>> int i=0;
>> FOR_ATOMS_OF_MOL(atom, mol) {
>> i++;
>> std::cout << i << ": " << atom->GetType() << std::endl ;
>> }
>>
>> }
>>
>>
>>
>> --
>> Marcos Villarreal
>> Dpto de Química Teórica y Computacional
>> Facultad de Ciencias Químicas
>> Universidad Nacional de Córdoba
>> Argentina.
>>
>> ------------------------------------------------------------
>> ------------------
>> 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
>>
>>
--
Marcos Villarreal
Dpto de Química Teórica y Computacional
Facultad de Ciencias Químicas
Universidad Nacional de Cordoba
------------------------------------------------------------------------------
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