File tree 2 files changed +18
-2
lines changed
2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 71
71
import pyobjcryst .spacegroup
72
72
import pyobjcryst .unitcell
73
73
import 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):
211
211
212
212
213
213
def loadcifdata (filename ):
214
- from pyobjcryst . crystal import CreateCrystalFromCIF
214
+ from pyobjcryst import loadCrystal
215
215
fullpath = datafile (filename )
216
- crst = CreateCrystalFromCIF ( open ( fullpath ) )
216
+ crst = loadCrystal ( fullpath )
217
217
return crst
You can’t perform that action at this time.
0 commit comments