#!/bin/csh setenv MOLDIR `pwd` # accept namelist format directory names, 1 line if ( $1 != '' ) then setenv MOLNAME `cut -f1 -d' ' ${1}/names | tr -s ' ' | tr -d ')' | tr -d '(' | tr -d '[' | tr -d ']' | sed s/' -'/' '/ | sed s/' -'/' '/ | sed s/' -'/' '/ | tr -s ' ' | tr -d '*' | tr -d '\"' | tr -d "\'" | tr / ' '` # make raster images if ( -f ${1}/${MOLNAME}-balls.png ) then echo image in place else balls < ${1}/*.pdb | render -png > ${1}/${MOLNAME}-balls.png endif if ( -f ${1}/${MOLNAME}-rods.png ) then echo image in place else rods < ${1}/*.pdb | render -png > ${1}/${MOLNAME}-rods.png endif echo "
\" && echo -n "$3"\" \" && cat "$1"/"$2"/"$3"/names && echo \" Smiles: \" && babel -isdf "$1"/"$2"/"$3"/"$3".sdf -osmiles && echo \" pdb file: "$3".pdb sdf file: "$3".sdf \"")}' | csh \ >> ${1}/index.html cd ${MOLDIR}/$1 && \ echo "$*" | tr / ' ' | cut -f3-104 -d ' ' | tr -s ' ' | tr ' ' '\n' | grep . | \ tr -d ')' | tr -d '(' | tr -d '[' | tr -d ']' | \ sed s/' -'/' '/ | sed s/' -'/' '/ | sed s/' -'/' '/ | tr -s ' ' | tr -d '*' | tr -d '\"' | tr -d "\'" | \ awk '{print("ln -s index.html "$1".html")}' | csh && \ cd ${MOLDIR} echo " Please note: images may show incorrect connectivity due to improper geometry. We will be working to improve this situation. For now, the left image should be correct, and the other two are correct, if they match the first. Image Links
")}'\ >> ${1}/index.html echo " Molecule Name Links
")}'\ >> ${1}/index.html echo " PubChem Fields
pubchem_'/ | sed s/' '// | sed s/' pubchem_total_charge'/pubchem_total_charge/\ >> ${1}/index.html #sed s/pubchem/'pubchem<\/a>'/ \ echo " Other Related Links
")}'\ >> ${1}/index.html echo " More coming soon! |
|
' \ >> ${1}/index.html echo inserting header ~/grabHtmlHeader ${1}/index.html ; ~/insertSidebar2 ${1}/index.html else echo argument required endif
' \ >> ${1}/index.html smiley \ >> ${1}/index.html echo '