Re: [Open Babel] Java API: setting OBConformerScore will crash application

2013-12-02 Thread Joos Kiener
It seems not possible to create a simple application were this issue happens. As a context I'm reading in molecules, generating 3D coordinates and then generate the Spectrophore. In a simple script-like snippet this works. In the complete application the results are written to an output file, the

Re: [Open Babel] Java API: setting OBConformerScore will crash application

2013-12-02 Thread Noel O'Boyle
Just a hint: one common problem with the forcefield code is that you forgot to check that Setup was successful (Setup can fail with crazy molecules that are not supported by a particular forcefield). This can result in any number of interesting segfaults if you call any other forcefield methods aft

Re: [Open Babel] Java API: setting OBConformerScore will crash application

2013-12-02 Thread Joos Kiener
The code for generating the conformers is as below: private void generateConformers(OBMol mol) { OBConformerSearch conformerSearch = new OBConformerSearch(); OBConformerScore score = new OBEnergyConformerScore(); conformerSearch.SetScore(score); if (!conformerSear

[Open Babel] (no subject)

2013-12-02 Thread Otto Kohulák
Hello, Thank you all who are helping me with this openbabel. I have difficultieswith conversion of pwscf files.Colleague of mine had the same problem, but was able to fix it. But now we cannot reproduce this "fix". But back to case, when I am wanted to convert a valid pwscf file like this: babel

Re: [Open Babel] (no subject)

2013-12-02 Thread Geoffrey Hutchison
PWSCF is a relatively new addition to the parser. So it's possible that it's a new type of file that isn't read correctly. Can you send me an example file or two? Thanks very much, -Geoff On Dec 2, 2013, at 8:41 AM, Otto Kohulák wrote: > Hello, > > Thank you all who are helping me with this

Re: [Open Babel] (no subject)

2013-12-02 Thread Craig James
On Mon, Dec 2, 2013 at 5:41 AM, Otto Kohulák wrote: > > babel -i pwscf pw.out -o xyz out.xyz > > the result is always: > > 0 molecules converted > 2 audit log messages > Can you convert from or to other formats? For example, can you do this? echo "CCO" | obabel -i smi -o sdf By the way, the

Re: [Open Babel] Java API: setting OBConformerScore will crash application

2013-12-02 Thread Joos Kiener
I can reproduce this on a different PC also running windows 7. The Windows Event viewer generates an entry for this: Faulting application name: java.exe, version: 7.0.450.18, time stamp: 0x525404d0 Faulting module name: ntdll.dll, version: 6.1.7601.18205, time stamp: 0x51db96c5 Exception code: 0xc

Re: [Open Babel] Java API: setting OBConformerScore will crash application

2013-12-02 Thread Geoffrey Hutchison
> Not sure if this helps at all. The whole issue is kind of confusing as > again, the exact same code works when called from a simpler snippet that > does not write results to a file and does not allow any options to be set. When you say "does not allow any options to be set," do you mean the OBC

Re: [Open Babel] Java API: setting OBConformerScore will crash application

2013-12-02 Thread Joos Kiener
Geoff Hutchison wrote > When you say "does not allow any options to be set," do you mean the > OBConformerScore isn't set? No I meant that the options are not exposed as cli parameters and hence it runs with default parameters (eg. nr of conformers, nr of children, mutability,...) -- View this

[Open Babel] count polar and non polar atoms

2013-12-02 Thread Francois Berenger
Dear list, I have a bunch of .mol2 files. I would like to count the number of atoms in each file as: total number of atoms, number of polar atoms, number of non polar atoms. Is there a way to do this rather easily with Open Babel? Thanks a lot, Francois. PS: I am not a chemist ---

Re: [Open Babel] Java API: setting OBConformerScore will crash application

2013-12-02 Thread Joos Kiener
This is confusing. This issue is some weird memory issue. At the end of this post is the most simple code I could come up with that reproduces the problem for me. I can make the code work by removing or commenting just any of the following lines (only one of them is enough): - conformerSearch.Se