[Open Babel] Invalid memory access during OBConversion.WriteFile()

2012-12-03 Thread mpillong
Hey everyone, I am currently running OpenBabel on a MacOSX 10.6.8 in Eclipse with Java. Recently, I encountered the following exception during using the WriteFile() Method in OBConversion: I have used the same method to write molecules before, the code looks like this: I have tried multiple

Re: [Open Babel] Invalid memory access during OBConversion.WriteFile()

2012-12-04 Thread mpillong
Hmmm, sorry about that, I was using the < raw > Tag here ... but here's the original text. Hey everyone, I am currently running OpenBabel on a MacOSX 10.6.8 in Eclipse with Java. Recently, I encountered the following exception during using the WriteFile() Method in OBConversion: 'Invalid memory

Re: [Open Babel] Invalid memory access during OBConversion.WriteFile()

2012-12-04 Thread mpillong
Hey Noel, indeed I started with the SetOutFormat method. Unfortunately, both methods (SetOut/SetInAndOut) return true, yet, the error during writing still remains, so I'm guessing it's happening somewhere during the writing :/. Thanks for your input! Max -- View this message in context: htt

Re: [Open Babel] Invalid memory access during OBConversion.WriteFile()

2012-12-04 Thread mpillong
Hey Fredrik, thanks for the input. The SetInAndOutFormat returns true, so I'm guessing there's nothing worng here. I've experienced this error with several inputfiles of varying format (pdb, sdf, mol2). Best regards, Max -- View this message in context: http://forums.openbabel.org/Invalid-m

Re: [Open Babel] Invalid memory access during OBConversion.WriteFile()

2012-12-04 Thread mpillong
Ah yes, my bad! Of course, I have also tried different output formats, but the error remains the same! -- View this message in context: http://forums.openbabel.org/Invalid-memory-access-during-OBConversion-WriteFile-tp4655729p4655737.html Sent from the General discussion mailing list archive at

Re: [Open Babel] Invalid memory access during OBConversion.WriteFile()

2012-12-04 Thread mpillong
Sure thing! Is the code sufficient, or would you need a runnable jar? package TestClasses; import org.openbabel.OBConversion; import org.openbabel.OBMol; public class TestOBWriteFile { public static void main(String[] args) { System.load("/Applications/OpenBab

[Open Babel] Deleting Residues and Atoms in Molecules

2013-01-15 Thread mpillong
Hey everyone, I seem to be stuck again. What I want to do is a sliding window analysis over the residues of a peptide. Currently, I implemented a for-loop that creates a copy of the original molecule and with every run deletes all residues outside of the sliding window. I delete the residues using

Re: [Open Babel] Deleting Residues and Atoms in Molecules

2013-01-15 Thread mpillong
Ah yes, thank you, that is a good idea. So basically, instead of directly deleting them, I put them in an ArrayList an later on iterate over the ArrayList and delete them starting from the back of the ArrayList. However, the following does not decrease the number of atoms in the temporary Molecule