Skip to content

Commit abbcacc

Browse files
committed
Added docs folder and DevelopersNotes.txt
1 parent 15dab58 commit abbcacc

2 files changed

Lines changed: 26 additions & 7 deletions

File tree

‎docs/DevelopersNotes.txt‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* Other Structure Packages *
2+
3+
Chris investigated pymmLib, and decided that it overemphasizes molecules and is
4+
therefore too complex for our purposes. It also appears that the software is
5+
developing very slowly. Very few of the support requests on the project page
6+
have been answered.
7+
8+
The space group code from pymmLib was useful, however, and merged into the
9+
Structure package. For the time being, there is no need to use cctbx.
10+
11+
* Cif read/write *
12+
13+
The package PyCifRW can be used for cif file reading. OpenBabel was
14+
investigated, and it does not support cif. OpenBabel deals only with molecular
15+
structure formats, such as pdb.

‎examples/StructureOperations.py‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ def expandStructureConstraints(S, clists):
3535

3636

3737

38-
Snew = expandStructure(S)
3938
# Get the exact operations applied to get Snew
4039
symoplists = getEssentialOperations(S)
40+
Snew = expandStructure(S, symoplists)
4141

4242
# Create the new constraints list.
4343
cnew = []
44-
# In order to update the space group equations, we have to apply the
45-
# rotation and translation operators of the essential symmetry operations to
46-
# the constraint equations. The u values and occ values don't change.
44+
# In order to update the constraint equations, apply the rotation and
45+
# translation operators of the essential symmetry operations. The u values
46+
# and occ values don't change.
4747
anum = 0 # keep track of which of the new atoms we're dealing with
4848
for i in range(len(S)):
4949
symops = symoplists[i]
@@ -120,14 +120,18 @@ def getEssentialOperations(S):
120120

121121
return symoplists
122122

123-
def expandStructure(S):
123+
def expandStructure(S, symoplists = None):
124124
"""Expand the structure based upon its space group.
125125
126-
S -- A structure to expand
126+
S -- A structure to expand
127+
symopilsts -- A list of symmetry operations to be applied by each atom. If
128+
symoplist is None (default), this is generated from the
129+
space group.
127130
128131
Returns a new Structure object.
129132
"""
130-
symoplists = getEssentialOperations(S)
133+
if symoplists is None:
134+
symoplists = getEssentialOperations(S)
131135
# Want a new instance of whatever 'S' is. It may be a PDFStructure
132136
# object.
133137
Snew = copy.deepcopy(S)

0 commit comments

Comments
 (0)