File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 7171import pyobjcryst .spacegroup
7272import pyobjcryst .unitcell
7373import pyobjcryst .zscatterer
74+
75+
76+ def loadCrystal (filename ):
77+ """Load pyobjcryst Crystal object from a CIF file.
78+
79+ filename -- CIF file to be loaded
80+
81+ Return a new Crystal object.
82+
83+ See pyobjcryst.crystal.CreateCrystalFromCIF for additional
84+ options for constructing Crystal object from CIF data.
85+ """
86+ from pyobjcryst .crystal import CreateCrystalFromCIF
87+ with open (filename ) as fp :
88+ rv = CreateCrystalFromCIF (fp )
89+ return rv
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ def datafile(filename):
211211
212212
213213def loadcifdata (filename ):
214- from pyobjcryst . crystal import CreateCrystalFromCIF
214+ from pyobjcryst import loadCrystal
215215 fullpath = datafile (filename )
216- crst = CreateCrystalFromCIF ( open ( fullpath ) )
216+ crst = loadCrystal ( fullpath )
217217 return crst
You can’t perform that action at this time.
0 commit comments