File: mirasradical

package info (click to toggle)
smiles-scripts 0.2.0%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,208 kB
  • sloc: perl: 1,189; java: 1,094; sh: 1,052; makefile: 249
file content (22 lines) | stat: -rwxr-xr-x 591 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/bash
# Moves to another directory all SMILES containing a sulphur atom which
# appears not to present a standard valence. These SMILES should be checked, 
# in many cases, they are coordination compounds with correct brackets around
# the sulphur.

[ -d ../working ] || mkdir ../working
for i in `ls *.smi` ; do
   radical=no
   dato=`cat $i | grep [[]S[]]`
   if [ "$dato" != "" ]; then
     radical=si
   else  
     dato=`cat $i | grep [[]SH[]]`
     if [ "$dato" != "" ]; then
       radical=si
     fi
   fi
   if [ "$radical" == "si" ]; then
       mv $i ../working
   fi
done