hall-symbols 0.1.0.4 → 0.1.0.5
raw patch · 3 files changed
+11/−36 lines, 3 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- README.md +7/−6
- hall-symbols.cabal +2/−2
- src/Crystallography/HallSymbols.hs +2/−28
README.md view
@@ -20,11 +20,15 @@ - hall-symbols-0.1.0.4 ``` -Build project.+Edit dependencies part of package.yaml like below. -```shell-% stack build ```+dependencies:+- base >= 4.7 && < 5+- matrix-as-xyz+- symmetry-operations-symbols+- hall-symbols+``` Then start repl. @@ -35,9 +39,6 @@ Setup packages and load modules. ```haskell-repl> :set -package matrix-as-xyz-repl> :set -package symmetry-operations-symbols-repl> :set -package hall-symbols repl> :m Data.Matrix.AsXYZ Data.Matrix.SymmetryOperationsSymbols Crystallography.HallSymbols ```
hall-symbols.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: c2e2ed9f27fb5a7cf649dcd9c0d306d1fa2de8b0760efccb8a138d070cbf0d12+-- hash: 872545710770f41dfedddbd9df54cad9ebd1fae11f74e610b342357c380d189f name: hall-symbols-version: 0.1.0.4+version: 0.1.0.5 synopsis: Symmetry operations generater of Hall Symbols description: Please see the README on GitHub at <https://github.com/narumij/hall-symbols#readme> category: Chemistry
src/Crystallography/HallSymbols.hs view
@@ -23,10 +23,9 @@ fromHallSymbols, fromHallSymbols', generatorsOfHallSymbols,- hallSymbols,--- hallSymbols', parser, generators,+ hallSymbols, LatticeSymbol, MatrixSymbol, OriginShift,@@ -150,29 +149,9 @@ -- 正常に終了すると、一般座標の行列を返します。 return equivalentPositions --- | Parse and make General Positions.-generateLikeITC :: CharParser () [Matrix Rational]-generateLikeITC = do- raw <- parser- let equivalentPositions = likeITC raw- if null equivalentPositions- then- fail "something happen when decode or generate process."- else- -- 正常に終了すると、一般座標の行列を返します。- return equivalentPositions--likeITC :: ( LatticeSymbol, [MatrixSymbol], OriginShift ) -> [Matrix Rational]-likeITC raw = if null h then [] else r - where- constructMatrices' (l,nat,v) = fmap (mapOriginShfit v) [lattice l, map matrix nat]- [a,b] = constructMatrices' . restoreDefaultAxis $ raw- h = generate $ [identity] ++ b- r = generate $ h ++ a- -- | Generate general equivalent positions by 4x4 matrix fromHallSymbols :: String -> Either ParseError [Matrix Rational]-fromHallSymbols s = parse generateLikeITC ("while reading " ++ show s) s+fromHallSymbols s = parse hallSymbols ("while reading " ++ show s) s -- | Generate general equivalent positions by 4x4 matrix (unsafe version) fromHallSymbols' :: String -> [Matrix Rational]@@ -187,11 +166,6 @@ Right mm -> mm where gg s = parse generators ("while reading " ++ show s) s---- | Generate general equivalent positions by 4x4 matrix--- same as old version fromHallSymbols-fromHallSymbols''' :: String -> Either ParseError [Matrix Rational]-fromHallSymbols''' s = parse hallSymbols ("while reading " ++ show s) s -- パースした簡約記号からseiz matrixを復元します decodeSymbols :: ( LatticeSymbol, [MatrixSymbol], OriginShift ) -> [Matrix Rational]