1
# Handle access to Psi cchbar module
5
# Mixin the InputGenerator
9
def initialize(task_obj)
11
# Set the generic command for this class
12
set_binary_command Psi::Commands::CCHBAR
16
# Add cchbar ability to Task
22
# Create a new scf object
23
cchbar_obj = Psi::CCHBar.new self
25
# Form the input hash and generate the input file
28
# Check to see if the function arguments have the reference, if so use it, otherwise use
30
if args_hash == nil or args_hash.has_key?("reference") == false
31
input_hash["reference"] = reference
34
# If we are doing analytic gradients make sure cchbar knows
35
if get_gradients == true
36
input_hash["dertype"] = "first"
38
input_hash["dertype"] = "none"
41
# Check the wavefunction
42
if args_hash == nil or args_hash.has_key?("wfn") == false
43
input_hash["wfn"] = wavefunction
46
# Merge what we've done with what the user wants
47
input_hash = input_hash.merge(args_hash) unless args_hash == nil
49
# Run the ccenergy module, sending the input file as keyboard input
51
cchbar_obj.execute(input_hash)
56
# Create some global functions
57
# User can send additional input parameters to the function
61
Psi::global_task.cchbar(args_hash)