MPQC  3.0.0-alpha
sc::PsiExEnv Class Reference

PsiExEnv specifies a Psi execution environment. More...

#include <chemistry/qc/psi/psiexenv.h>

Inheritance diagram for sc::PsiExEnv:
sc::DescribedClass sc::RefCount

Public Member Functions

 PsiExEnv (const Ref< KeyVal > &)
 A KeyVal constructor is used to generate a PsiExEnv object from the input. More...
 
Ref< PsiInputpsi_input () const
 Returns the PsiInput object which PsiExEnv uses.
 
Ref< PsiFile11psi_file11 () const
 Returns the PsiFile11 object which PsiExEnv uses.
 
Ref< PsiInputget_psi_input ()
 Creates the PsiInput object which PsiExEnv uses.
 
Ref< PsiFile11get_psi_file11 ()
 Creates the PsiFile11 object which PsiExEnv uses.
 
void run_psi (bool skip_input=false)
 Executes Psi input+driver. More...
 
void run_psi_module (const char *module, const std::vector< std::string > &args=std::vector< std::string >())
 Executes a Psi module using a system call. Throws if psi fails.
 
void run_psiclean (bool fullclean=true)
 cleans Psi scratch files using the same approach as psiclean. More...
 
const std::string & get_cwd () const
 Returns current working directory.
 
const std::string & get_fileprefix () const
 Returns the Psi file prefix.
 
int get_nscratch () const
 Returns the number of scratch locations.
 
const std::string & get_scratch (int i) const
 Returns the ith scratch location.
 
psi::PSIO & psio ()
 Returns an instance of psi::PSIO.
 
psi::Chkpt & chkpt ()
 Returns an instance of psi::Chkpt.
 
void print (std::ostream &o=ExEnv::out0()) const
 Print the object.
 
void keep_output ()
 this will cause psi driver to keep the output next time it's run. Must be called every time to prevent the output file from truncation
 
- Public Member Functions inherited from sc::DescribedClass
 DescribedClass (const DescribedClass &)
 
DescribedClassoperator= (const DescribedClass &)
 
ClassDescclass_desc () const MPQC__NOEXCEPT
 This returns the unique pointer to the ClassDesc corresponding to the given type_info object. More...
 
const char * class_name () const
 Return the name of the object's exact type.
 
int class_version () const
 Return the version of the class.
 
Ref< DescribedClassref ()
 Return this object wrapped up in a Ref smart pointer. More...
 
- Public Member Functions inherited from sc::RefCount
size_t identifier () const
 Return the unique identifier for this object that can be compared for different objects of different types. More...
 
int lock_ptr () const
 Lock this object.
 
int unlock_ptr () const
 Unlock this object.
 
void use_locks (bool inVal)
 start and stop using locks on this object
 
refcount_t nreference () const
 Return the reference count.
 
refcount_t reference ()
 Increment the reference count and return the new count.
 
refcount_t dereference ()
 Decrement the reference count and return the new count.
 
int managed () const
 
void unmanage ()
 Turn off the reference counting mechanism for this object. More...
 

Static Public Member Functions

static const Ref< PsiExEnv > & get_default_instance ()
 

Additional Inherited Members

- Protected Member Functions inherited from sc::RefCount
 RefCount (const RefCount &)
 
RefCountoperator= (const RefCount &)
 

Detailed Description

PsiExEnv specifies a Psi execution environment.

Constructor & Destructor Documentation

◆ PsiExEnv()

sc::PsiExEnv::PsiExEnv ( const Ref< KeyVal > &  )

A KeyVal constructor is used to generate a PsiExEnv object from the input.

The full list of keywords that are accepted is below.

KeywordTypeDefault

Description

cwdstring.

the current working directory (small Psi files will be written here)

fileprefixstring

filename.psi<td>the name prefix used for scratch files produced by Psi

stdoutstring

fileprefix.stdout<td>the file to which Psi standard output will be written

stderrstring

fileprefix.stderr<td>the file to which Psi standard error will be written

scratcharray of strings[ <ConsumableResources::disk_location()> ]

the location to which large scratch files will be written

In addition, the location of Psi executables can be overridden by setting environmental variable PSIBIN to the desired value. By default, Psi executables in the location specified with the –with-psi configure script option will be used.

Member Function Documentation

◆ run_psi()

void sc::PsiExEnv::run_psi ( bool  skip_input = false)

Executes Psi input+driver.

Parameters
skip_inputwhether to skip running "input" module. The default is false.
See also
PsiExEnv::run_psi_module()

◆ run_psiclean()

void sc::PsiExEnv::run_psiclean ( bool  fullclean = true)

cleans Psi scratch files using the same approach as psiclean.

Parameters
fullcleanif set to true, clean out all files including the checkpoint file

The documentation for this class was generated from the following file:

Generated at Sun Jan 26 2020 23:24:09 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.