Copyright | (c) Jun Narumi 2020 |
---|---|
License | MIT |
Maintainer | narumij@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Read and Display Seitz Symbol
- References
A. Michael Glazer et al. Seitz symbols Acta Cryst. (2014). A70
ネスポロ マッシモ:日本結晶学会誌 59,210-222(2017). https:/www.jstage.jst.go.jparticlejcrsj59559_210/_pdf
Synopsis
- type SeitzSymbol a = (String, String, (a, a, a), (Ratio a, Ratio a, Ratio a))
- fromSeitzSymbolS :: (Integral a, Read a) => SourceName -> Either ParseError (Matrix (Ratio a))
- fromSeitzSymbolHexS :: (Integral a, Read a) => String -> Either ParseError (Matrix (Ratio a))
- toSeitzSymbolS :: (Integral a, Show a) => Matrix (Ratio a) -> Maybe String
Documentation
fromSeitzSymbolS :: (Integral a, Read a) => SourceName -> Either ParseError (Matrix (Ratio a)) Source #
for cubic, tetragonal, orthorhombic, monoclinic and triclinic crystal systems.
>>>
prettyXYZ <$> fromSeitzSymbolS "{ 1 | 0 0 0 }"
Right "x,y,z">>>
prettyXYZ <$> fromSeitzSymbolS "{ 2 010 | 1/2 1/2 1/2 }"
Right "-x+1/2,y+1/2,-z+1/2">>>
prettyXYZ <$> fromSeitzSymbolS "{ 3+ 111 | 1/2 1/2 1/2 }"
Right "z+1/2,x+1/2,y+1/2">>>
prettyXYZ <$> fromSeitzSymbolS "{ -3+ 111 | 1/2 1/2 1/2 }"
Right "-z+1/2,-x+1/2,-y+1/2">>>
prettyXYZ <$> fromSeitzSymbolS "{ m 100 | 0 0 0 }"
Right "-x,y,z">>>
(liftError . fromSeitzSymbolS) "{ 2 010 | 1/2 1/2 1/2 }" >>= fromMatrix
Right " 2 (0,1/2,0) 1/4,y,1/4">>>
(liftError . fromSeitzSymbolS) "{ 3+ 111 | 1/2 1/2 1/2 }" >>= fromMatrix
Right " 3+(1/2,1/2,1/2) x,x,x">>>
(liftError . fromSeitzSymbolS) "{ -3+ 111 | 1/2 1/2 1/2 }" >>= fromMatrix
Right "-3+ x,x,x; 1/4,1/4,1/4">>>
(liftError . fromSeitzSymbolS) "{ m 100 | 0 0 0 }" >>= fromMatrix
Right " m 0,y,z"
fromSeitzSymbolHexS :: (Integral a, Read a) => String -> Either ParseError (Matrix (Ratio a)) Source #
for hexagonal and trigonal crystal systems.
>>>
prettyXYZ <$> fromSeitzSymbolHexS "{ m 100 | 0 0 0 }"
Right "y-x,y,z">>>
prettyXYZ <$> fromSeitzSymbolHexS "{ m 120 | 0 0 0 }"
Right "x-y,-y,z">>>
prettyXYZ <$> fromSeitzSymbolHexS "{ 2 100 | 0 0 0 }"
Right "x-y,-y,-z">>>
(liftError . fromSeitzSymbolHexS) "{ m 100 | 0 0 0 }" >>= fromMatrix
Right " m x,2x,z">>>
(liftError . fromSeitzSymbolHexS) "{ m 120 | 0 0 0 }" >>= fromMatrix
Right " m x,0,z">>>
(liftError . fromSeitzSymbolHexS) "{ 2 100 | 0 0 0 }" >>= fromMatrix
Right " 2 x,0,0"