Skip to content

Commit

Permalink
Merge pull request #27 from vincefn/master
Browse files Browse the repository at this point in the history
Molecule and Crystal unit tests: always add the scattering power to the Crystal before the scatterer
  • Loading branch information
st3107 authored Dec 20, 2021
2 parents 41b3e39 + 58a97f6 commit 569b7db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/pyobjcryst/tests/pyobjcrysttestutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def makeScattererAnisotropic():

def makeCrystal(sp, atom):
c = Crystal(3.52, 3.52, 3.52, "225")
c.AddScatterer(atom)
c.AddScatteringPower(sp)
c.AddScatterer(atom)
return c

def getScatterer():
Expand Down Expand Up @@ -138,6 +138,8 @@ def makeMnO6():
sp1.SetBiso(8*pi*pi*0.003)
sp2 = ScatteringPowerAtom("O", "O")
sp2.SetBiso(8*pi*pi*0.003)
crystal.AddScatteringPower(sp1)
crystal.AddScatteringPower(sp2)

m = MakeOctahedron(crystal, "MnO6", sp1, sp2, 0.5*a)

Expand Down
2 changes: 1 addition & 1 deletion src/pyobjcryst/tests/testcrystal.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def testRemoveFunctions(self):

# You can add scatterers with the same name. That should be a no-no.
sp2, atom2 = makeScatterer()
c.AddScatterer(atom2)
c.AddScatteringPower(sp2)
c.AddScatterer(atom2)

# These act according to the library. You can try to remove an object
# that is not in the crystal, and it will gladly do nothing for you.
Expand Down

0 comments on commit 569b7db

Please sign in to comment.