Package schrodinger :: Package application :: Package jaguar :: Module input :: Class JaguarInput
[hide private]
[frames] | no frames]

Class JaguarInput

object --+
         |
        JaguarInput

A class for specifying Jaguar input.

This is a thin wrapper to the mmjag library and carries very little internal information.

Instance Methods [hide private]
 
__init__(self, input=None, name=None, handle=None, structure=None, genkeys=None, reload=None, run_kwargs=None)
There are three main ways to create a JaguarInput instance: from a Jaguar input file 'input', an mmjag handle 'handle', or a Structure instance 'structure'.
 
__del__(self)
Delete the mmjag handle and clean up the mmlibs.
 
__copy__(self)
Create a copy of the JaguarInput object, setting name to <jobname>_copy.
 
launch(self, *args, **kwargs)
Save the file and launch a job.
 
run(self, **kwargs)
Save the file and launch a job with the wait option.
 
save(self)
Write an input file to name.in.
 
saveAs(self, file_)
Write an input file to name.in and set the object's name attribute.
 
_setNameFile(self, input)
Set the name and file properties from a named input file or jobname.
 
_getName(self)
Return the name of the job.
 
_setName(self, name)
Set the name of the job and update the filename.
 
getAtomCount(self, zmat=0)
Return the number of atoms for the specified zmat.
 
getValue(self, key)
Return the &gen section value for keyword 'key'.
 
getDefault(self, key)
Return the default value for &gen section keyword 'key'.
 
setValue(self, key, value)
Set the &gen section keyword 'key' to the value provided.
 
setValues(self, dict_)
Set multiple &gen section keywords from the provided dictionary 'dict_'.
 
deleteKey(self, key)
Remove a key from the &gen section.
 
deleteKeys(self, keys)
Remove a list of keys from the &gen section.
 
getNonDefault(self)
Return a dictionary of all non-default keys except 'multip' and 'molchg', which must be retrieved explicitly since they are connected to the geometry.
 
setDirective(self, name, value)
Set a file specification directive.
 
getDirective(self, name)
Get a file specification directive.
 
getDirectives(self)
Get all file specification directives, except for MAEFILE, which is weeded out by the mmjag function itself.
 
writeMaefile(self, filename=None, struct=None)
Write an associated .mae file and set the MAEFILE directive.
 
_getRestart(self)
Get the restart name associated with the input file.
 
getStructure(self, zmat=0)
Return a Structure representation of the specified zmat section.
 
setStructure(self, struct, zmat=0)
Set one of the zmat sections from the provided Structure (or MMCT handle).
 
_setCounterpoise(self, atom, value, zmat=0)
Set the counterpoise status (True or False) for the specified atom.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  reload = False
  run_kwargs = {}
Properties [hide private]
  name
Return the name of the job.
  restart
Get the restart jobname based on the current name.

Inherited from object: __class__

Method Details [hide private]

__init__(self, input=None, name=None, handle=None, structure=None, genkeys=None, reload=None, run_kwargs=None)
(Constructor)

 

There are three main ways to create a JaguarInput instance:
from a Jaguar input file 'input', an mmjag handle 'handle', or a
Structure instance 'structure'.

The 'input' parameter will provide for initialization and job name
from an existing Jaguar input file. (If no new name is provided,
calling the save() method will overwrite the original file.)

Note that the structure and name parameters will modify the object
status after loading from a file or initialization from a handle has
completed. This can be utilized to get the settings from a Jaguar
input file but replace the geometry for a new calculation.

Parameters

input (str)
    A jaguar input file; a default name will be derived from the
    input value.

name (str)
    A jaguar job name that will override the name derived from
    'input'.

handle (int)
    An mmjag handle, pointing to an existing mmjag instance in
    memory.

structure (schrodinger.structure.Structure)
    A structure that will populate a new mmjag instance. If
    specified with 'input' or 'handle' it will replace any structure
    provided by them.

genkeys (mapping)
    A dictionary of keyword/value pairs to set in the input &gen
    section. If keywords are specified in this mapping and the file,
    the genkeys value will be used.

reload (bool)
    Specifies whether to reload the job from an output file in the
    run() method. Default value is False, but can be modified by
    setting JaguarInput.reload to a different value.

run_kwargs (mapping)
    The run_kwargs dictionary provides default keyword settings for
    the run function that is called from the launch and run methods.
    Default is to set no defaults, but this can be modified by
    setting JaguarInput.run_kwargs to a different value.

Overrides: object.__init__

launch(self, *args, **kwargs)

 

Save the file and launch a job. Returns a jobcontrol.Job object.

Uses the class run_kwargs value as base for keyword arguments to the run function.

run(self, **kwargs)

 

Save the file and launch a job with the wait option. Returns a JaguarOutput object. Raises an exception if the job failed.

Set the class (or instance) attribute reload to True to load existing output files of the same name.

_setNameFile(self, input)

 

Set the name and file properties from a named input file or jobname.

This method keeps the filename and jobname in sync.

getValue(self, key)

 

Return the &gen section value for keyword 'key'.

The return type is as defined by mmjag_key_type().

setValue(self, key, value)

 

Set the &gen section keyword 'key' to the value provided.

If value is None, the keyword will be unset.

setValues(self, dict_)

 

Set multiple &gen section keywords from the provided dictionary 'dict_'.

Note that one easy way to specify the dict_ argument is via the "dict(basis='6-31g**', igeopt=1)" syntax for constructing a dictionary.

writeMaefile(self, filename=None, struct=None)

 

Write an associated .mae file and set the MAEFILE directive. If no name is provided, use jobname.mae. If no struct is provided, use self.getStructure().

If an absolute filename is not provided but the input file is known, write the mae file relative to the input file.

getStructure(self, zmat=0)

 

Return a Structure representation of the specified zmat section.

Note that if the JaguarInput instance was created from a Jaguar
input file that has no associated Maestro file (MAEFILE), the Lewis
structure is determined automatically based on atom distances.

Parameters

zmat (mmjag enum)
    The zmat to return (MMJAG_ZMAT1, MMJAG_ZMAT2, or MMJAG_ZMAT3).

setStructure(self, struct, zmat=0)

 

Set one of the zmat sections from the provided Structure (or MMCT
handle).

Calling this method will update the values of molchg and
multip.  molchg will be consistent with the sum of formal
charges in the provided CT, while multip will be set according
to the CT-level i_m_Spin_multiplicity property.

Parameters

struct (schrodinger.structure.Structure)
    The structure to use for setting.

zmat (mmjag enum)
    The zmat to set (MMJAG_ZMAT1, MMJAG_ZMAT2, or MMJAG_ZMAT3).

_setCounterpoise(self, atom, value, zmat=0)

 

Set the counterpoise status (True or False) for the specified atom.

Parameters

atom (int)
    The index of the atom to modify.

value (bool)
    Use True to make it counterpoise, False to make it real.

zmat (mmjag enum)
    The zmatrix to modify.


Property Details [hide private]

name

Return the name of the job.

Get Method:
_getName(self) - Return the name of the job.
Set Method:
_setName(self, name) - Set the name of the job and update the filename.
Delete Method:
'Set the jobname; also updates the filename based on the jobname.'

restart

Get the restart jobname based on the current name.

Get Method:
_getRestart(self) - Get the restart name associated with the input file.