Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
OperationAnalyzer(op1)
except Exception as e:
fail(e)
check()
print(" class Orientation")
try:
from pyxtal.operations import Orientation
except Exception as e:
fail(e)
if passed():
try:
for i in range(10):
v1 = random_vector()
c1 = random_vector()
o = Orientation.from_constraint(v1, c1)
except Exception as e:
fail(e)
check()
# =====symmetry=====
print("pyxtal.symmetry")
reset()
try:
import pyxtal.symmetry
except Exception as e:
fail(e)
print(" get_wyckoffs (may take a moment)")
except Exception as e:
fail(e)
check()
print(" rotate_vector")
try:
from pyxtal.operations import rotate_vector
except Exception as e:
fail(e)
if passed():
try:
for i in range(10):
v1 = random_vector()
v2 = random_vector()
rotate_vector(v1, v2)
except Exception as e:
fail(e)
check()
print(" are_equal")
try:
from pyxtal.operations import are_equal
except Exception as e:
fail(e)
if passed():
try:
op1 = SymmOp.from_xyz_string("x,y,z")
op2 = SymmOp.from_xyz_string("x,y,z+1")
except Exception as e:
fail(e)
check()
print(" angle")
try:
from pyxtal.operations import angle
except Exception as e:
fail(e)
if passed():
try:
for i in range(10):
v1 = random_vector()
v2 = random_vector()
angle(v1, v2)
except Exception as e:
fail(e)
check()
print(" random_shear_matrix")
try:
from pyxtal.operations import random_shear_matrix
except Exception as e:
fail(e)
if passed():
try:
for i in range(10):
random_shear_matrix()
reset()
try:
import pyxtal.operations
except Exception as e:
fail(e)
print(" random_vector")
try:
from pyxtal.operations import random_vector
except Exception as e:
fail(e)
if passed():
try:
for i in range(10):
random_vector()
except Exception as e:
fail(e)
check()
print(" angle")
try:
from pyxtal.operations import angle
except Exception as e:
fail(e)
if passed():
try:
for i in range(10):
v1 = random_vector()
v2 = random_vector()
except Exception as e:
fail(e)
check()
print(" class Orientation")
try:
from pyxtal.operations import Orientation
except Exception as e:
fail(e)
if passed():
try:
for i in range(10):
v1 = random_vector()
c1 = random_vector()
o = Orientation.from_constraint(v1, c1)
except Exception as e:
fail(e)
check()
# =====symmetry=====
print("pyxtal.symmetry")
reset()
try:
import pyxtal.symmetry
except Exception as e:
fail(e)
print(" get_wyckoffs (may take a moment)")
try:
get_inertia_tensor(h2o)
get_inertia_tensor(ch4)
except Exception as e:
fail(e)
check()
print(" get_moment_of_inertia")
try:
from pyxtal.molecule import get_moment_of_inertia
except Exception as e:
fail(e)
if passed():
try:
v = random_vector()
get_moment_of_inertia(h2o, v)
get_moment_of_inertia(ch4, v)
except Exception as e:
fail(e)
check()
print(" reoriented_molecule")
try:
from pyxtal.molecule import reoriented_molecule
except Exception as e:
fail(e)
if passed():
try:
reoriented_molecule(h2o)
except Exception as e:
fail(e)
check()
print(" class OperationAnalyzer")
try:
from pyxtal.operations import OperationAnalyzer
except Exception as e:
fail(e)
if passed():
try:
for i in range(10):
m = aa2matrix(1, 1, random=True)
t = random_vector()
op1 = SymmOp.from_rotation_and_translation(m, t)
OperationAnalyzer(op1)
except Exception as e:
fail(e)
check()
print(" class Orientation")
try:
from pyxtal.operations import Orientation
except Exception as e:
fail(e)
if passed():
try:
for i in range(10):