Re: Problem with CIF to PDB conversion (symmetry extesion)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion (symmetry extesion)

Vincent Favre-Nicolin-2
On lundi 1 juin 2009, systemguy wrote:
> Hi All, I am have a problem converting a CIF to a PDB.  When I convert with
> Open Babel and view with Avogadro, I get an incomplete structure.  Not sure
> of this is user error or a 'to do'. Any  help would be greatly appreciated.

  (Note: Avogadro could have opened directly the unit cell.)

  I don't think there is any 'error' strictly speaking - I have not checked
the output in detail but both are probably correct.

  The difference is that openbabel takes the CIF with 13 atoms, and outputs a
pdb with the same 13 atoms. Whereas the other program uses the space group to
generate all symmetrics (96 atoms) - I assume to fill the unit cell, and this
seems to be what you want.

   One mistake from openbabel is that the pdb output does not write the
correct space group (Imma in this case), and writes P1 - the other program
too, but then it has extended the structure to P1 so it is legitimate.

  This was discussed before - I believe that ob has all the necessary code to
handle the symmetry information, but no function ExpandToP1() has been written
yet (?)

        Vincent
--
Vincent Favre-Nicolin   -   http://vincefn.net

Université Joseph Fourier  -  http://physique-eea.ujf-grenoble.fr/

ObjCryst/Fox : http://objcryst.sf.net


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion (symmetry extesion)

Geoffrey Hutchison

On Jun 1, 2009, at 4:23 PM, Vincent Favre-Nicolin wrote:

>  This was discussed before - I believe that ob has all the necessary  
> code to
> handle the symmetry information, but no function ExpandToP1() has  
> been written
> yet (?)

It's called OBUnitCell::FillUnitCell() and has been implemented since  
2.2.0. The 2.2.x branch has some fixes (from Avogadro testing),

Yes, you're probably right that this method should set the space group  
back to P1 as well.

Cheers,
-Geoff

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion (symmetry extesion)

systemguy

>It's called OBUnitCell::FillUnitCell() and has been implemented since  
>2.2.0. The 2.2.x branch has some fixes (from Avogadro testing)

Thank you.  I found FillUnitCell in the API documentation. Is there any way of calling this function from the OB gui or do I need to code something in C++?

Cheers,
Mike


Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion (symmetry extesion)

Vincent Favre-Nicolin-2
In reply to this post by Vincent Favre-Nicolin-2
On lundi 1 juin 2009, Geoffrey Hutchison wrote:
> It's called OBUnitCell::FillUnitCell() and has been implemented since
> 2.2.0. The 2.2.x branch has some fixes (from Avogadro testing),

  Great, I only looked in SpaceGroup. I'll try to add an optionnal switch to
use this for CIF.
  Is there a standard switch (e.g. "-U") that we could use to fill the UC for
the different formats that include spacegroup information (cif, pdb, cml,...) ?

        Vincent
--
Vincent Favre-Nicolin   -   http://vincefn.net

Université Joseph Fourier  -  http://physique-eea.ujf-grenoble.fr/

ObjCryst/Fox : http://objcryst.sf.net


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion (symmetryextesion)

Miguel Quirós Olozábal
El mar, 02-06-2009 a las 08:13 +0200, Vincent Favre-Nicolin escribió:
> On lundi 1 juin 2009, Geoffrey Hutchison wrote:
> > It's called OBUnitCell::FillUnitCell() and has been implemented since
> > 2.2.0. The 2.2.x branch has some fixes (from Avogadro testing),
>
>   Great, I only looked in SpaceGroup. I'll try to add an optionnal switch to
> use this for CIF.
>   Is there a standard switch (e.g. "-U") that we could use to fill the UC for
> the different formats that include spacegroup information (cif, pdb, cml,...) ?

I will be VERY interested in the existence of such switch, in my labour
of CIF -> SMILES conversion of the structures of Crystallographic Open
Database.

Best wishes,
Miguel Quirós

--
Miguel Quirós Olozábal
Departamento de Química Inorgánica. Facultad de Ciencias.
Universidad de Granada. 18071 Granada. SPAIN.
email: mquiros<at>ugr<dot>es
       mquiros<arroba>ugr<punto>es


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion (symmetry extesion)

Noel O'Boyle
Administrator
In reply to this post by systemguy
2009/6/2 systemguy <[hidden email]>:
>
>
>>It's called OBUnitCell::FillUnitCell() and has been implemented since
>>2.2.0. The 2.2.x branch has some fixes (from Avogadro testing)
>
> Thank you.  I found FillUnitCell in the API documentation. Is there any way
> of calling this function from the OB gui or do I need to code something in
> C++?

You will need to code it yourself, at least until the next OB release.
But you don't need to use C++. OB has bindings in several languages
(see the Install page for details).

> Cheers,
> Mike
>
>
>
> --
> View this message in context: http://www.nabble.com/Re%3A-Problem-with-CIF-to-PDB-conversion-%28symmetry-extesion%29-tp23821618p23824123.html
> Sent from the openbabel-discuss mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion (symmetry extesion)

Chris Morley-3
In reply to this post by Vincent Favre-Nicolin-2
Vincent Favre-Nicolin wrote:
> On lundi 1 juin 2009, Geoffrey Hutchison wrote:
>> It's called OBUnitCell::FillUnitCell() and has been implemented since
>> 2.2.0. The 2.2.x branch has some fixes (from Avogadro testing),
>
>   Great, I only looked in SpaceGroup. I'll try to add an optionnal switch to
> use this for CIF.
>   Is there a standard switch (e.g. "-U") that we could use to fill the UC for
> the different formats that include spacegroup information (cif, pdb, cml,...) ?
>
An OBOp plugin could be used for this. Use gen3d.cpp as a template,
change the name of the option, the description and the few lines of
code which changes the OBMol. It will then be available as a command
line option (e.g. --fillUC), available for all in and out formats, and
as a checkbox in the GUI. Documentation, if needed, is in op.h.

Chris


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion ( symmetry extesion )

Vincent Favre-Nicolin-2
Le mardi 02 juin 2009 15:03:07, Chris Morley a écrit :

> Vincent Favre-Nicolin wrote:
> >   Is there a standard switch (e.g. "-U") that we could use to fill the UC
> > for the different formats that include spacegroup information (cif, pdb,
> > cml,...) ?
>
> An OBOp plugin could be used for this. Use gen3d.cpp as a template,
> change the name of the option, the description and the few lines of
> code which changes the OBMol. It will then be available as a command
> line option (e.g. --fillUC), available for all in and out formats, and
> as a checkbox in the GUI. Documentation, if needed, is in op.h.

  OK - this would be better indeed. I would however have several cases to
handle:
(1) generate all symmetrics that are inside the UC (0 <= x,y,z <1) - this
would break the connectivity of a molecule unless all connected atoms are
within the asymmetric unit
(2) generate all symmetrics, but do not break the connectivity, even if some
atoms go beyond the UC limits - this will only work if the input coordinates
correspond to connected atoms, though

so,  "--fillUC strict" and "--fillUC keepconnect" ?

        Vincent
--
Vincent Favre-Nicolin

CEA / INAC                              http://inac.cea.fr
Université Joseph Fourier        http://www.ujf-grenoble.fr

http://vincefn.net
ObjCryst & Fox : http://objcryst.sourceforge.net


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion ( symmetry extesion )

Geoffrey Hutchison

On Jun 2, 2009, at 9:27 AM, Vincent Favre-Nicolin wrote:

>> An OBOp plugin could be used for this. Use gen3d.cpp as a template,
>> change the name of the option, the description and the few lines of
>> code which changes the OBMol

It's also possible to do this as a per-format read option, e.g. "-af"  
=> fill unit cell.

> (1) generate all symmetrics that are inside the UC (0 <= x,y,z <1) -  
> this
> would break the connectivity of a molecule unless all connected  
> atoms are
> within the asymmetric unit

I'm open to suggestions about handling bonds across unit cells. The  
technique in Avogadro is to generate a super cell, then running  
connect-the-dots across cell boundaries.

I think this is what most people expect for inorganic crystals and  
many organic ones too.

> so,  "--fillUC strict" and "--fillUC keepconnect" ?

Yes, that's a good idea.

-Geoff

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion (symmetry extesion)

systemguy
In reply to this post by Geoffrey Hutchison
> It's called OBUnitCell::FillUnitCell() and has been implemented since  
> 2.2.0. The 2.2.x branch has some fixes (from Avogadro testing),

I have installed the API for Visual Basic under VS 2005 now I am having some troubles filling the unit cell.  The code below gives the error "Attempted to read or write protected memory".  I assume I am calling FillUnitCell all wrong.  Any help getting this working would be appreciated.  If VB doesn't work for you then an example in C# of filling a unit cell would be great.  THANKS!

Also, I eventually need to create a SuperCell from the unit cell.  Can I use FillUnitCell for this as well?


Visual Basic Code under VS2005:
Imports System.Collections.Generic
Imports System.Text
Imports OpenBabel
Imports System.IO

Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim strFolder As String = "c:\temp\"
        Dim OBConv As New OBConversion()
        Dim Mol As New OBMol()
        Dim Unitcell As New OBUnitCell

        If OBConv.SetInAndOutFormats("CIF", "PDB") Then
            OBConv.ReadFile(Mol, strFolder & "cit5.cif")
            Unitcell.FillUnitCell(Mol)
            OBConv.WriteFile(Mol, strFolder & "cit5.pdb")
        End If

    End Sub

End Class
Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion (symmetry extesion)

Noel O'Boyle
Administrator
2009/6/2 systemguy <[hidden email]>:

>
>> It's called OBUnitCell::FillUnitCell() and has been implemented since
>> 2.2.0. The 2.2.x branch has some fixes (from Avogadro testing),
>
> I have installed the API for Visual Basic under VS 2005 now I am having some
> troubles filling the unit cell.  The code below gives the error "Attempted
> to read or write protected memory".  I assume I am calling FillUnitCell all
> wrong.  Any help getting this working would be appreciated.  If VB doesn't
> work for you then an example in C# of filling a unit cell would be great.
> THANKS!
>
> Also, I eventually need to create a SuperCell from the unit cell.  Can I use
> FillUnitCell for this as well?
>
>
> Visual Basic Code under VS2005:
> Imports System.Collections.Generic
> Imports System.Text
> Imports OpenBabel
> Imports System.IO
>
> Public Class Form1
>    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
>        Dim strFolder As String = "c:\temp\"
>        Dim OBConv As New OBConversion()
>        Dim Mol As New OBMol()
>        Dim Unitcell As New OBUnitCell
>
>        If OBConv.SetInAndOutFormats("CIF", "PDB") Then
>            OBConv.ReadFile(Mol, strFolder & "cit5.cif")
>            Unitcell.FillUnitCell(Mol)
>            OBConv.WriteFile(Mol, strFolder & "cit5.pdb")
>        End If
>
>    End Sub
>
> End Class

Hmmm...I get a segfault also, with slightly different code (I think
you need to access the unitcelldata object of the molecule first,
rather than creating a new empty one). I think there's some work to be
done by the OB devs here:

>>> import pybel
>>> mol = pybel.readfile("cif","tmp2.cif").next()
==============================
*** Open Babel Warning  in OpenBabel::SpaceGroup::Find
  Unknown space group with incomplete or wrong definition.
>>> unitcell = mol.unitcell
>>> unitcell.FillUnitCell(mol.OBMol)
# Segfault

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion (symmetry extension)

Vincent Favre-Nicolin
Le mercredi 03 juin 2009 17:41:01, Noel O'Boyle a écrit :
> ==============================
> *** Open Babel Warning  in OpenBabel::SpaceGroup::Find
>   Unknown space group with incomplete or wrong definition.

  If the spacegroup is not recognised, then that explains the problem - a
check that "GetSpaceGroup()" actually returns something should be added to
FillUnitCell though.

> >>> unitcell = mol.unitcell
> >>> unitcell.FillUnitCell(mol.OBMol)
>
> # Segfault

  I tried the same (from Python) on an AL203 cif file, and it worked fine.

  Can you post the cif file with the unrecognised spacegroup ?

--
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


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion (symmetry extension)

systemguy

> >>> unitcell = mol.unitcell
> >>> unitcell.FillUnitCell(mol.OBMol)

>  I tried the same (from Python) on an AL203 cif file, and it worked fine.
>  Can you post the cif file with the unrecognised spacegroup ?

Perhaps I am doing something wrong using the VB API but obunitcell is not a member of obmol.  Therefore I cannot get the "unitcell = mol.unitcell" code to work.  This is probably the heart of the problem.  

If i set the space group and data manually. Then it works fine.  Note that SetSpaceGroup would not take 'Imma', it would only take the numerical reference(74).  This code works but I would like to set all this data directly from the original CIF file:
        Dim OBConv As New OBConversion()
        Dim Mol As New OBMol()
        Dim Unitcell As New OBUnitCell            
         
        OBConv.ReadFile(Mol, strFolder & "cit5.cif")
        Unitcell.SetSpaceGroup(74)
        Unitcell.SetData(13.695, 5.021, 25.497, 90.0, 90.0, 90.0)
        Unitcell.FillUnitCell(Mol)
        OBConv.WriteFile(Mol, strFolder & "cit5_c.pdb")

Per your request, here is the CIF I am using:
data_CFI
_chemical_name_systematic
'CIT-5'
_chemical_formula_structural
'[Si32O64]'

_cell_length_a   13.695
_cell_length_b   5.021
_cell_length_c   25.497
_cell_angle_alpha   90.0
_cell_angle_beta   90.0
_cell_angle_gamma   90.0
_cell_formula_units_Z 1
_symmetry_space_group_name_H-M    'Imma'

loop_
_atom_site_label
_atom_site_type_symbol
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
_atom_site_B_iso_or_equiv
_atom_site_occupancy
Si1  Si  0.1160  0.2500  0.0317  3.32  1.0
Si2  Si  0.0000  0.7500  0.2788  6.47  1.0
Si3  Si  0.2820  0.7500  0.1887  3.95  1.0
Si4  Si  0.0000  0.2500  0.2177  1.58  1.0
Si5  Si  0.1936  0.2500  0.1479  3.24  1.0
O1  O  0.0000  0.2500  0.0512  3.87  1.0
O2  O  0.0853  0.2500  0.1737  1.18  1.0
O3  O  0.0000  0.5776  0.2309  8.69  1.0
O4  O  0.1303  0.0000  0.0000  42.56  1.0
O5  O  0.1896  0.2500  0.0909  4.74  1.0
O6  O  0.2500  0.7500  0.2500  6.79  1.0
O7  O  0.0913  0.7500  0.3099  3.71  1.0
O8  O  0.2640  0.4474  0.1665  5.53  1.0

# End of data for CIT-5
Reply | Threaded
Open this post in threaded view
|

Re: Problem with CIF to PDB conversion (symmetry extension)

Noel O'Boyle
Administrator
To get the unitcell, you need to use something like
   unitcell = myOBMol.GetData(openbabel.UnitCell)

openbabel.UnitCell is just an integer. Its value is 12.

The problem is that you need to cast that unitcell variable from an
OBGenericData to an OBUnitCell. Casting works in C++, but not in
scripting languages, and I'm not sure whether I've added this ability
to the VB bindings.

- Noel

2009/6/4 systemguy <[hidden email]>:

>
>
>> >>> unitcell = mol.unitcell
>> >>> unitcell.FillUnitCell(mol.OBMol)
>
>>  I tried the same (from Python) on an AL203 cif file, and it worked fine.
>>  Can you post the cif file with the unrecognised spacegroup ?
>
> Perhaps I am doing something wrong using the VB API but obunitcell is not a
> member of obmol.  Therefore I cannot get the "unitcell = mol.unitcell" code
> to work.  This is probably the heart of the problem.
>
> If i set the space group and data manually. Then it works fine.  Note that
> SetSpaceGroup would not take 'Imma', it would only take the numerical
> reference(74).  This code works but I would like to set all this data
> directly from the original CIF file:
>        Dim OBConv As New OBConversion()
>        Dim Mol As New OBMol()
>        Dim Unitcell As New OBUnitCell
>
>        OBConv.ReadFile(Mol, strFolder & "cit5.cif")
>        Unitcell.SetSpaceGroup(74)
>        Unitcell.SetData(13.695, 5.021, 25.497, 90.0, 90.0, 90.0)
>        Unitcell.FillUnitCell(Mol)
>        OBConv.WriteFile(Mol, strFolder & "cit5_c.pdb")
>
> Per your request, here is the CIF I am using:
> data_CFI
> _chemical_name_systematic
> 'CIT-5'
> _chemical_formula_structural
> '[Si32O64]'
>
> _cell_length_a   13.695
> _cell_length_b   5.021
> _cell_length_c   25.497
> _cell_angle_alpha   90.0
> _cell_angle_beta   90.0
> _cell_angle_gamma   90.0
> _cell_formula_units_Z 1
> _symmetry_space_group_name_H-M    'Imma'
>
> loop_
> _atom_site_label
> _atom_site_type_symbol
> _atom_site_fract_x
> _atom_site_fract_y
> _atom_site_fract_z
> _atom_site_B_iso_or_equiv
> _atom_site_occupancy
> Si1  Si  0.1160  0.2500  0.0317  3.32  1.0
> Si2  Si  0.0000  0.7500  0.2788  6.47  1.0
> Si3  Si  0.2820  0.7500  0.1887  3.95  1.0
> Si4  Si  0.0000  0.2500  0.2177  1.58  1.0
> Si5  Si  0.1936  0.2500  0.1479  3.24  1.0
> O1  O  0.0000  0.2500  0.0512  3.87  1.0
> O2  O  0.0853  0.2500  0.1737  1.18  1.0
> O3  O  0.0000  0.5776  0.2309  8.69  1.0
> O4  O  0.1303  0.0000  0.0000  42.56  1.0
> O5  O  0.1896  0.2500  0.0909  4.74  1.0
> O6  O  0.2500  0.7500  0.2500  6.79  1.0
> O7  O  0.0913  0.7500  0.3099  3.71  1.0
> O8  O  0.2640  0.4474  0.1665  5.53  1.0
>
> # End of data for CIT-5
> --
> View this message in context: http://www.nabble.com/Re%3A-Problem-with-CIF-to-PDB-conversion-%28symmetry-extesion%29-tp23821618p23871592.html
> Sent from the openbabel-discuss mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: specegroup identification problem (was :Problem with CIF to PDB conversion (symmetry extension))

Vincent Favre-Nicolin-2
In reply to this post by Vincent Favre-Nicolin-2
   Hi,

On vendredi 5 juin 2009, Noel O'Boyle wrote:
> I'm forwarding some files from Mike (systemguy). I've verified that
> the segfault occurs with CIT5.cif (on latest openbabel 22x branch)

   OK, the problem is the recognition of the Hermann-Mauguin symbol - ob
recognizes "I m m a" (as it is declared in spacegroups.txt) but not "Imma" - a
simple fix would be to remove all whitespaces from symbols (HM & Hall) when
making a search.
   I can do it - unless Jean prefers to do it ?

   I think it's clear for HM symbols that they can be compressed - as for Hall
symbols, I'd have to check if they are unique when whitespace-compressed.

        Vincent
--
Vincent Favre-Nicolin   -   http://vincefn.net

Université Joseph Fourier  -  http://physique-eea.ujf-grenoble.fr/

ObjCryst/Fox : http://objcryst.sf.net


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: specegroup identification problem (was :Problem with CIF to PDB conversion (symmetry extension))

Jean Brefort
Le samedi 06 juin 2009 à 11:17 +0200, Vincent Favre-Nicolin a écrit :

> Hi,
>
> On vendredi 5 juin 2009, Noel O'Boyle wrote:
> > I'm forwarding some files from Mike (systemguy). I've verified that
> > the segfault occurs with CIT5.cif (on latest openbabel 22x branch)
>
>    OK, the problem is the recognition of the Hermann-Mauguin symbol - ob
> recognizes "I m m a" (as it is declared in spacegroups.txt) but not "Imma" - a
> simple fix would be to remove all whitespaces from symbols (HM & Hall) when
> making a search.
>    I can do it - unless Jean prefers to do it ?

You can do it, no problem.
I also encountered an issue with a cif file containing a non standard
space group (something like a base centered triclinic!). We do not
support that since our code assumes that all space groups are in the
database.

Jean

>    I think it's clear for HM symbols that they can be compressed - as for Hall
> symbols, I'd have to check if they are unique when whitespace-compressed.
>
> Vincent


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: specegroup identification problem (was :Problem with CIF to PDB conversion (symmetry extension))

Noel O'Boyle
Administrator
In reply to this post by Vincent Favre-Nicolin-2
Is this a malformed CIF? If so, we can ask systemguy to report it to
the original software that generated the CIF.

2009/6/6 Vincent Favre-Nicolin <[hidden email]>:

>   Hi,
>
> On vendredi 5 juin 2009, Noel O'Boyle wrote:
>> I'm forwarding some files from Mike (systemguy). I've verified that
>> the segfault occurs with CIT5.cif (on latest openbabel 22x branch)
>
>   OK, the problem is the recognition of the Hermann-Mauguin symbol - ob
> recognizes "I m m a" (as it is declared in spacegroups.txt) but not "Imma" - a
> simple fix would be to remove all whitespaces from symbols (HM & Hall) when
> making a search.
>   I can do it - unless Jean prefers to do it ?
>
>   I think it's clear for HM symbols that they can be compressed - as for Hall
> symbols, I'd have to check if they are unique when whitespace-compressed.
>
>        Vincent
> --
> Vincent Favre-Nicolin   -   http://vincefn.net
>
> Université Joseph Fourier  -  http://physique-eea.ujf-grenoble.fr/
>
> ObjCryst/Fox : http://objcryst.sf.net
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: specegroup identification problem (was :Problem with CIF to PDB conversion (symmetry extension))

Vincent Favre-Nicolin
In reply to this post by Vincent Favre-Nicolin-2
On samedi 6 juin 2009, Noel O'Boyle wrote:
> Is this a malformed CIF? If so, we can ask systemguy to report it to
> the original software that generated the CIF.

  Well, it seems malformed indeed. According to:
http://www.iucr.org/__data/iucr/cifdic_html/1/cif_core.dic/Ispace_group_name_H-M_alt.html

"Each component of the space-group name is separated by a
   space or an underscore. The use of a space is strongly
   recommended.  The underscore is only retained because it
   was used in older files. It should not be
   used in new CIFs."

  So "Imma" is incorrect (cif-wise) because it is not separated by spaces,
whereas "I m m a" is correct. However I believe we should still
support this because any human-written cif will likeyl use the
compressed version... Also because the Spacegroup code is not
just used for CIF input (scripting, etc..)

  And I just discovered that there could be (old) valid symbols separated
by underscores - another thing to strip from incoming HM names.

  Also, we may need to support short HM symbols (e.g. P21 instead
of P 1 21 1)...

   Vincent
--
Vincent Favre-Nicolin                  

CEA/Grenoble       Institut Nanosciences & Cryogénie    -   http://inac.cea.fr/

Université Joseph Fourier  -  http://physique-eea.ujf-grenoble.fr/

tél: (+33) 4 38 78 95 40           fax: (+33) 4 38 78 51 38


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: spacegroup identification problem (was :Problem with CIF to PDB conversion (symmetry extension))

Vincent Favre-Nicolin-2
In reply to this post by Vincent Favre-Nicolin-2
        Hi,

  Ok, I just commited changes to the spacegroup.h and spacegroup.cpp files -
This should normally allow to match a wider range of Hermann-Mauguin symbols,
(even when not valid for CIF files):
   for spacegroup "P 1 21 1", also match: "P21" "P1211","P_21","P 21", etc...

  However Hall symbols still require to have the 3 components separated by
spaces - these usually are only automatically generated, so they should be
well formatted.

        Vincent
--
Vincent Favre-Nicolin   -   http://vincefn.net

Université Joseph Fourier  -  http://physique-eea.ujf-grenoble.fr/

ObjCryst/Fox : http://objcryst.sf.net


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: spacegroup identification problem (was :Problem with CIF to PDB conversion (symmetry extension))

systemguy
>>  Ok, I just commited changes to the spacegroup.h and spacegroup.cpp files -
>> This should normally allow to match a wider range of Hermann-Mauguin symbols,
>> (even when not valid for CIF files):
>>    for spacegroup "P 1 21 1", also match: "P21" "P1211","P_21","P 21", etc...


Thank you all so much for making these changes even though I had a malformed cif and all.

Not sure anyone else would care but incorporating Avogadro's supercell builder code would be great for me.  I tried working with the code myself but I am not that much of a programmer.  I am building some giant supercells and Avogadro takes a long time since it tries to draw the supercell as well as create the file.  Command line functionality a la OB would be very helpful (I think this is on the Avogadro to do list eventually).

Best,
Mike
12