File: miracradicalarom

package info (click to toggle)
smiles-scripts 0.4.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,308 kB
  • sloc: perl: 2,333; java: 1,231; sh: 1,154; makefile: 253
file content (18 lines) | stat: -rwxr-xr-x 527 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /bin/bash
# Moves to another directory all SMILES containing a carbon atom which
# appears not to be tetravalent. These SMILES should be checked to see if
# they are organometallic compounds, they contain bonds with wrong bond orders
# or are genuine radicals (quite infrequent).

[ -d crad ] || mkdir crad
for i in `ls *.smi` ; do
   dato=`cat $i | grep [[]c[]]`
   if [ "$dato" != "" ]; then
     mv $i crad
   else  
     dato=`cat $i | grep [[]cH[]]`
     if [ "$dato" != "" ]; then
       mv $i crad
     fi
   fi
done