Permalink
Browse files

small fix in Smiles

  • Loading branch information...
1 parent b78661c commit 89a001c77800ae41d71d1af4e62a789af3f743c7 @rhz committed May 22, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 MinimalGlueings.hs
  2. +2 −2 Smiles.hs
View
@@ -29,7 +29,7 @@ main = do inputFilename : _ <- getArgs
dDots = map (detailedDot env m1 m2) m3s
basename = dropExtension inputFilename
- outputFilenames = map (++ ".dot") . map ((basename ++ "-") ++) $ map show [0..length m3s]
+ outputFilenames = map (++ ".dot") . map ((basename ++ "-") ++) $ map show [1..length m3s]
writeFile (basename ++ ".dot") cDot
zipWithM_ writeFile outputFilenames dDots
View
@@ -27,7 +27,7 @@ toSmiles glucose c1 c4 c6 kexpr = "O" ++ smile (Just anchor)
smile :: Maybe Agent -> String
smile Nothing = ""
- smile (Just (Agent _ intf)) = glucopyranose (smile $ neighbourAt "C4") (smile $ neighbourAt "C6")
+ smile (Just (Agent _ intf)) = glucopyranose (smile $ neighbourAt c4) (smile $ neighbourAt c6)
where neighbourAt sn = do (Site _ _ (Bound bl)) <- find ((== sn) . siteName) intf
(a1, sn1, sn2, a2) <- Map.lookup bl lm
if sn1 == sn
@@ -41,7 +41,7 @@ main = do inputFilename : glucose : c1 : c4 : c6 : _ <- getArgs
smiles = map (toSmiles glucose c1 c4 c6) kexprs
basename = dropExtension inputFilename
- outputFilenames = map (++ ".smi") . map ((basename ++ "-") ++) $ map show [0..length smiles]
+ outputFilenames = map (++ ".smi") . map ((basename ++ "-") ++) $ map show [1..length smiles]
zipWithM_ writeFile outputFilenames smiles

0 comments on commit 89a001c

Please sign in to comment.