Yes it looks like a bug, FillUnitCell skips the bonds altogether - in this
case it looks like the original atomic positions are at least in part
outside the UC, so they are moved around when FillUnitCell is called, so
that even old bonds can end up wrong (because 1 atom of a bond has been
wrapped and not the other..).

Yes, that's exactly the issue. The crystal structure consists of full
organic chemicals, and FillUnitCell is agnostic to this.

After mol.unitcell.FillUnitCell, can you try:
mol.OBMol.ConnectTheDots()
mol.OBMol.PerceiveBondOrders()

I've tried this, but it's way too slow. I'm guessing ConnectTheDots is
O(N^2), and N is big in crystal structures.

Is there a way to better control the unit cell? Say, returning a 2x2x2-cell
structure or recentering the coordinates so the organic molecules don't get
split up?




On Mon, May 6, 2013 at 2:45 AM, Vincent Favre-Nicolin <
vinc...@users.sourceforge.net> wrote:

>
> Le 3 mai 2013 à 21:26, Patrick Fuller a écrit :
>
> > I think open babel wants me to do something like
> `mol.unitcell.FillUnitCell(mol.OBMol)`, where `mol` is an instance of
> `pybel.Molecule`. Doing so results in
> >
> > I think that the unit-cell-filling operation is skipping bonds entirely,
> and these bonds are residual from the pre-filled structure.
> >
> > Is this a legitimate bug, or am I just using the functions improperly?
>
>
>         Yes it looks like a bug, FillUnitCell skips the bonds altogether -
> in this case it looks like the original atomic positions are at least in
> part outside the UC, so they are moved around when FillUnitCell is called,
> so that even old bonds can end up wrong (because 1 atom of a bond has been
> wrapped and not the other..).
>         FillUnitCell should either discard the bonds (keep only atoms), or
> redo ConnectTheDots & PerceiveBondOrder(), or do its best to generate
> symmetric bonds (but it is tricky as it depends on whether both atoms of
> any given bond are wrapped or not).
>
>         After mol.unitcell.FillUnitCell, can you try:
>
>  mol.OBMol.ConnectTheDots()
>  mol.OBMol.PerceiveBondOrders()
>
>         Vincent
> --
> Vincent Favre-Nicolin                    http://inac.cea.fr
>
> CEA/Grenoble              Institut Nanosciences & Cryogénie
> Laboratoire SP2M/Nano-structures et Rayonnement Synchrotron
> 17, rue des Martyrs
> 38054 Grenoble Cedex 9 - France
>
> Université Joseph Fourier        http://www.ujf-grenoble.fr
>
> tél: (+33) 4 38 78 95 40           fax: (+33) 4 38 78 51 38
>
>
>
> ------------------------------------------------------------------------------
> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
> Get 100% visibility into your production application - at no cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap1
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to