Author Topic: Automatimg Define  (Read 2252 times)

ym21d@fsu.edu

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Automatimg Define
« on: May 19, 2023, 08:25:22 PM »
I am using turbomole through the program PuTTY, which uses Unix line commands. I am trying to automate my workflow as much as possible. Is there a way that I can use the Unix line commands to utomate calling define movimg through each step, making the selections I want. Or, is there another way of automating define?
Thank you,

antti_karttunen

  • Sr. Member
  • ****
  • Posts: 227
  • Karma: +1/-0
Re: Automatimg Define
« Reply #1 on: May 20, 2023, 11:27:39 AM »
Hi,

sure, you can feed define any input with the standard approach in Unix:
Code: [Select]
define < define.in
where define.in contains the commands for define.

Define sessions can be "recorded" easily with the tee command, please see the script below for an example.

Best wishes,
Antti

Code: [Select]
#!/bin/bash
# defrec: Record define session to file for later usage

OUTNAME=define.in

program_usage(){
cat <<EOF

*****************************************************************
*    defrec: Record define session to file for later usage      *
*****************************************************************

Usage: defrec

- defrec records all commands given to define into file $OUTNAME
- After finishing define, interupt defrec with Ctrl+C
- The command file can then be executed in another job directory:

  define < $OUTNAME

- Useful when you need to construct many similar Turbomole jobs.

EOF
}

# Check parameters
while [[ $# -gt 0 ]]
do
  case "$1" in
    "-h" | "-help" | "--help" ) program_usage ; exit 1 ;;
    *  ) program_usage ; exit 1 ;;
  esac
done

tee $OUTNAME | define