Hi,
Can someone test attached patch? It fixes the space groups list (adding
variants for groups #1 and #2, accepts unknown groups, and understand
the symmetry operations from the CIF file (they changed the field name).
Regards,
Jean
Le lundi 12 mars 2012 à 11:56 -0400, Geoffrey Hutchison a écrit :
> > 1. Add all variants to the database (who volunteers?)
> > 2. Accept unkonwn groups.
>
> I think we'd want a combination of both. Over time, we have been adding more
> variants. I'm not sure there's a complete list of all variants -- several
> times, I've looked.
>
> But we could also add code which accepts an unknown group and parses the
> symmetry operations from the CIF, correct?
>
> -Geoff
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> OpenBabel-Devel mailing list
> OpenBabel-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Index: src/formats/cifformat.cpp
===================================================================
--- src/formats/cifformat.cpp (révision 4733)
+++ src/formats/cifformat.cpp (copie de travail)
@@ -270,6 +270,7 @@
void Parse(std::istream &in);
/// The data blocks, after parsing. The key is the name of the data block
std::map<std::string,CIFData> mvData;
+ /// The current iterator r
/// Global comments, outside and data block
std::list<std::string> mvComment;
};
@@ -583,7 +584,9 @@
}
if(mSpaceGroup == NULL) {
SpaceGroup *sg = new SpaceGroup();
- positem=mvItem.find("_symmetry_equiv_pos_as_xyz");
+ positem=mvItem.find("_space_group_symop_operation_xyz");
+ if(positem==mvItem.end())
+ positem=mvItem.find("_symmetry_equiv_pos_as_xyz");
if(positem!=mvItem.end())
{
sg->AddTransform (positem->second);
@@ -595,7 +598,9 @@
{
map<ci_string,vector<string> >::const_iterator pos;
unsigned i, nb;
- pos=loop->second.find("_symmetry_equiv_pos_as_xyz");
+ pos=loop->second.find("_space_group_symop_operation_xyz");
+ if (pos==loop->second.end())
+ pos=loop->second.find("_symmetry_equiv_pos_as_xyz");
if (pos!=loop->second.end())
{
nb=pos->second.size();
@@ -607,7 +612,10 @@
}
if (found)
mSpaceGroup = SpaceGroup::Find(sg);
- delete sg;
+ if (m_SpaceGroup == NULL && sg->IsValid())
+ m_SpaceGroup = sg;
+ else
+ delete sg;
}
}
if(mSpaceGroup == NULL)
Index: data/space-groups.txt
===================================================================
--- data/space-groups.txt (révision 4733)
+++ data/space-groups.txt (copie de travail)
@@ -3,12 +3,88 @@
P 1
x,y,z
+1
+A 1
+A 1
+x,y,z
+x,1/2+y,1/2+z
+
+1
+B 1
+B 1
+x,y,z
+1/2+x,y,1/2+z
+
+1
+C 1
+C 1
+x,y,z
+1/2+x,1/2+y,z
+
+1
+F 1
+F 1
+x,y,z
+x,1/2+y,1/2+z
+1/2+x,y,1/2+z
+1/2+x,1/2+y,z
+
+1
+I 1
+I 1
+x,y,z
+1/2+x,1/2+y,1/2+z
+
2
-P 1
P -1
x,y,z
-x,-y,-z
+2
+-A 1
+A -1
+x,y,z
+x,1/2+y,1/2+z
+-x,-y,-z
+-x,1/2-y,1/2-z
+
+2
+-B 1
+B -1
+x,y,z
+1/2+x,y,1/2+z
+-x,-y,-z
+1/2-x,-y,1/2-z
+
+2
+-C 1
+C -1
+x,y,z
+1/2+x,1/2+y,z
+-x,-y,-z
+1/2-x,1/2-y,-z
+
+2
+-F 1
+F -1
+x,y,z
+x,1/2+y,1/2+z
+1/2+x,y,1/2+z
+1/2+x,1/2+y,z
+-x,-y,-z
+-x,1/2-y,1/2-z
+1/2-x,-y,1/2-z
+1/2-x,1/2-y,-z
+
+2
+-I 1
+I -1
+x,y,z
+1/2+x,1/2+y,1/2+z
+-x,-y,-z
+1/2-x,1/2-y,1/2-z
+
3
P 2y
P 2,P 1 2 1
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel