I'm not able to compress output files when using the python API.
I'm using code like this:
import openbabel
obConversion = openbabel.OBConversion()
obConversion.SetInAndOutFormats("pdb", "mol2")
mol = openbabel.OBMol()
obConversion.ReadFile(mol, "input.pdb.gz")
obConversion.AddOption("z")
obCo
)
So, try obConversion.GENOPTIONS ?
Andrew
da...@dalkescientific.com
On Apr 11, 2019, at 15:31, Tim Dudgeon wrote:
Unfortunately that doesn't work either. Still writes uncompressed.
On 11/04/2019 14:15, Andrew Dalke wrote:
obConversion.AddOp
Another Python options question.
I can use the protonation option on the CLI:
echo "C1=C(NC=N1)C[C@@H](C(=O)O)N" | obabel -i smi -o mol -p 3
But I can't figure it out with the Python API:
import openbabel
obConversion = openbabel.OBConversion()
obConversion.SetInAndOutFormats("smi", "mol")
m
I'm getting 'Segmentation fault (core dumped)' errors when using gzipped
output formats.
It seems to depends on what is being written, but when it happens it
always happens.
e.g.
$ obabel data.pdb.gz -O output.mol2.gz -h -z
Segmentation fault (core dumped)
$ obabel data.pdb.gz -O output.mol2 -
relevant docs:
http://openbabel.org/api/2.3/classOpenBabel_1_1OBPhModel.shtml
Regards,
- Noel
On Thu, 11 Apr 2019 at 16:11, Tim Dudgeon <mailto:tdudgeon...@gmail.com>> wrote:
Another Python options question.
I can use the protonation option on the CLI:
> echo "C1=C(NC=N1)C[C@@H](C
And with NGLViewer.
http://nglviewer.org/ngl/
Just drag the mol2 file into the window.
On 24/03/2020 19:54, Amanda Loshbaugh wrote:
If you would like to /view/ the structure in 3D, you can open mol2
files in PyMOL.
Amanda Loshbaugh, PhD
Scientist I, Protein and Cell Engineering
Lyell Immuno
I think I'm using 3.1, but can't be totally sure.
How do you ask this from python? I can't see any obvious way.
Tim
On Tue, Oct 19, 2021 at 7:22 PM Geoffrey Hutchison <
geoff.hutchi...@gmail.com> wrote:
> > I'm having problems when generating 3D molecules using the Python
> bindings.
> > This may
7:52 PM Stefano Forli via OpenBabel-discuss <
openbabel-discuss@lists.sourceforge.net> wrote:
> The easiest way to get the version would be this:
>
> from openbabel import openbabel as ob
> print(ob.OBReleaseVersion())
>
>
> On 10/22/21 06:46, Tim Dudgeon wrote
I'm using the Python bindings to do various things, and want to be able to
do MMF94 energy calculations and minimisations such as these:
https://open-babel.readthedocs.io/en/latest/Command-line_tools/babel.html#forcefield-energy-and-minimization
Is this possible from Python?
Tim
___
It seems that the atom charges being generated when converting to mol2
format do not take into account the formal charge on the atoms.
$ echo 'CC(=O)Nc1ccc2[nH+]c(C)cc([O-])c2c1' | obabel -i smiles -o mol2
--gen2d
@MOLECULE
*
16 17 0 0 0
SMALL
GASTEIGER
@ATOM
1 C 2.5981 -1.
I'm using the mol.make3D() function from Python to generate 3D coordinates.
This is working OK, but when I run this in a K8S container running on a
host machine with a large number of cores (124) but with the K8S pod
restricted to 1 core then what seems to happen is that OBabel tries to spin
up a h
I'm trying to work out how to use openbabel from Python to perform
operations such as extracting out ligands from macromolecules in PDB or CIF
format. For instance, if I have a ligand that has the residue name of LIG,
how do I create a new molecule with just that ligand so that I can write it
out i
65 1.00
>> 0.00 C
>> ATOM 19 C ALA A 3 3.451 -4.925 -1.148 1.00
>> 0.00 C
>> ATOM 20 O ALA A 3 3.668 -6.018 -1.670 1.00
>> 0.00 O
>> ATOM 21 CB ALA A 3 2.461 -5.731 0.981 1.00
>&g
I'm finding that OBabel 3.1.1 seems to be unable to handle some CIF files
that have been generated by ACEDRG (
https://www2.mrc-lmb.cam.ac.uk/groups/murshudov/content/acedrg/acedrg.html).
One such file is attached.
When running this code no errors are thrown but the molecule seems to empty
(molwt i
Problems similar to this have been asked, but I've not seen an answer.
In my case I'm trying to pip install openbabel but it's failing.
I have a dockerfile like this:
FROM python:3.10.12-slim-bullseye
RUN apt-get update && apt-get -y install gcc swig &&\
apt-get clean
RUN pip install openbabel==
15 matches
Mail list logo