File: miranradicalarom

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 (26 lines) | stat: -rwxr-xr-x 705 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/bash
# Moves to another directory all SMILES containing an aromatic nitrogen 
# atom which appears with brackets. These SMILES should be checked, 
# in many cases, they are coordination compounds, the nitrogen is cationic
# or has an H-atom that needs to be explicit, brackets being correct. 

[ -d nrad ] || mkdir nrad
for i in `ls *.smi` ; do
   dato=`cat $i | grep [[]n[]]`
   if [ "$dato" != "" ]; then
     echo $dato
     mv $i nrad
   else
     dato=`cat $i | grep [[]n+[]]`
     if [ "$dato" != "" ]; then
       echo $dato
       mv $i nrad
     else
       dato=`cat $i | grep [[]nH`
       if [ "$dato" != "" ]; then
         echo $dato
         mv $i nrad
       fi
     fi
   fi
done