Trees | Indices | Help |
|
---|
|
A class for writing MacroModel com files.
The class has methods to write jobname.com files for a broad range of calculation types. The class is initallized with reasonable OPCD argument default values, so the methods like mini() are usable 'out of the box'. The OPCD arguments are easily modified by accessing the dict values. There is a generic writeComFile() method that allows you write any com file by passing a list of arguments, IO and OPCDs.
If no arguments are provide to the constructor the defaults are:
API examples:
# Example 1 ############################################################ # Writing an energy listing com file via writeComFile. import schrodinger.application.macromodel.utils as mmodutils mcu = mmodutils.ComUtil() # create a default instance of the class com_file_args = [ 'example1.com', # The name of the com file to write. 'input.mae', # The name of the input structure file. 'output.mae', # The name of the output structure file. 'EXNB', 'BDCO', 'FFLD', 'READ', 'ELST' ] mcu.writeComFile(com_file_args) # Example 2 ############################################################ # Writing an energy listing com file via a utility methods. import schrodinger.application.macromodel.utils as mmodutils mcu = mmodutils.ComUtil() com_file_name = mcu.elst('example2.mae') # Example 3 ############################################################ # Writing an minimization com file with customized parameters. import schrodinger.application.macromodel.utils as mmodutils mcu = mmodutils.ComUtil() mcu.MINI[1] = 9 # Use Truncated Newton Conjugate Gradient minimizer. mcu.CONV[5] = 0.0001 # Halt when gradient reaches this stringent value. mcu.mini('example3.mae') # Example 4 ############################################################ # Writing an minimization com file that includes water GB/SA solvation. import schrodinger.application.macromodel.utils as mmodutils mcu = mmodutils.ComUtil(solv=True) mcu.mini('example4.mae') # Example 5 ############################################################ # Writing an minimization com file that requests a substructure. # See the SbcUtil class for how to construct a .sbc file, this # example assumes an appropriate .sbc file already exists. import schrodinger.application.macromodel.utils as mmodutils mcu = mmodutils.ComUtil(subs=True) mcu.mini('example5.mae')
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
|
|
|||
boolean |
beautify If True don't write disabled opcds. |
||
boolean |
cgo3 If True enable the writing of CGO3 to com files. |
||
boolean |
cgo4 If True enable the writing of CGO3 to com files. |
||
boolean |
cgo5 If True enable the writing of CGO5 to com files. |
||
boolean |
cgo6 If True enable the writing of CGO6 to com files. |
||
boolean |
mmod If True enable MMOD and write MacroModel/Maestro interaction-monitor files. |
||
boolean |
refit_args If True reformat large float value to fit in the alternate field format (%6.3f - %9.0f). |
||
boolean |
serial_nonconf_input If True enable DEBG 55 property management when self.serial is also True. |
||
string |
structure_file_ext Default structure file extention for file names automatically determined by outComFile(). |
|
This method loads the default data members and methods. It sets default OPCD arguments, and com file preferences (e.g. no solvent model, OPLSAA_2005, yes to BDCO).
|
This method writes a com file, and returns the name of the written com file. It requires a list containing the name of the com file to be written, the name of the input file, the name of the output file, and a series of OPCDs. The arguments for the OPCDs are looked up in turn, evaluating the next eight elements for the specific OPCD argument dictionary, each time the OPCD is encountered. See setOpcdArgs(), getOpcdArgs(), and __init__() for more information about default arguments. |
This method returns a formatted string of OPCD and arguments for the passed OPCD string. The arguments come from the hash data members, any unknown or unassigned values default to 0 or 0.0. You may customize the self hash arguments to your heart's content prior to invoking the method to get the exact behavior you want. The 'OPCD' lookup requires the passed argument to be a key for the hash, i.e. uppercase with no whitespace. The array of arg values are numbers, not strings. This method keeps count of the number of times an OPCD is called and automatically increments the array of args for the passed OPCD. The first call for a given OPCD uses self['OPCD'] arg slices 1-8, the next call for that OPCD uses slices 9-16, the next 17-24, and so on. writeComFile() zeros the count after the com file is serialized. |
This method returns True after adding the passed values to the desired opcd dictionary. The dictionary is selected by the first parameter, which is required. The rest of the parameters are mapped to the next eight argument indices in the dictionary. Unspecified values default to 0 or 0.0. This method determines the highest existing index (numeric hash key), and then assigns the passed args to the next available slots. You may want to first blank the dictionary with the appropriate call of self['OPCD'].clear(). Assumming the dictionary has has been cleared, the first 'set' of a given OPCD assigns self['OPCD'] arg indices 1-8, the next call for that OPCD defines indices 9-16, the next 17-24, and so on. |
This is a static helper method for the jobs that write com files. Returns an 'out' string for the passed 'in' string. Raises an Exception if the file name can't be determined.
|
Define ASET arguments from a set dictionary. Numeric hash keys index the lists of atom numbers. The numerical key is taken as the set number identifier. |
This method returns a list of arguments that form the toplevel command invocation with all the flags set in the instance. It takes a string argument that specifies the name of the com file to run, and returns the fully qualified executable and all commandline arguments. |
This method writes a com file for a single point energy listing, returns the name of the com file written. It requires a string containing the the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a single point energy listing of 1st and 2nd derivatives, returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a geometry optimization, returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for redundant conformer elimination, returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. COMP atoms must be set outside of this method. |
This method writes a com file for a special atom filtering, similar to premin's, but with 0 minimization iterations; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a geometry optimization and filtering with MULT and COMP; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. It is intended for filtering conformation search output. |
This method writes a com file for a geometry drive; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. It is intended for filtering conformation search output. DEGB 150 starts the drive from the input geometry, not the endpoint of the previous iteration. |
This method writes a com file for a lowmode conformation search; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a large scale lowmode conformation search; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a monte carlo multiple minimum conformation search; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a systematic pseudo monte carlo multiple minimum conformation search; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. This method always uses torsional memory and will preoptimize ring closure distances. |
This method writes a com file for a mixed monte carlo multiple minimum/lowmode conformation search; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a mixed monte carlo multiple minimum/large scale lowmode conformation search; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a ligand torsion search with ConfGen; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a molecular dynamics simulation; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a mixed Monte Carlo/Stochastic Dynamics simulation; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a Metropolis Monte Carlo ensemble generation; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. The arguments for ZMAT must be set outside this method. ZMAT makes all the structural changes so the min-max range should allow diverse sampling (5 deg bends, 180 tors). |
This method writes a com file for an All Degrees of Freedom simulation (a Metropolis Monte Carlo with passive Importance sampling) calculation; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. The arguments for ZMAT must be set outside this method. ZMAT makes all the structural changes so the min-max range should allow diverse sampling (5 deg bends, 180 tors). |
This method writes a com file for a Jump Between Wells simulation (a Metropolis Monte carlo simulation with active Importance sampling); returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. The arguments for ZMAT must be set outside this method. |
This method writes a com file for a Jump Between Wells/Stochastic Dynamics simulation (a MCSD simulation with active Importance sampling); returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. The arguments for ZMAT must be set outside this method. |
This method writes a com file for a geometry analysis; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. The arguments for GEOM must be set outside this method. |
This method writes a com file for an ALGN/COPY positioning of ligands on a reference ligand; returns the name of the com file written. The ligands are positioned on the first ligand (all four ways) with ALGN/COPY. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for an MBAE multiple minimization run, in energy difference mode; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for an MBAE multiple minimization run, in set interaction mode; returns the name of the com file written. recep_atom is the last atomic index of the receptor structure. If recep_atom is None then the first structure in the mae_file is evaluated. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. The ASET arguments are set by snooping the input file for the number of atoms in the receptor. raises IOError if the receptor atom total can't be determined from the input structure file. |
This method writes a com file for an MBAE low mode conformation search run, in energy difference mode; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. If ComUtil.algn is true, then a the job will positions the ligands on the reference ligand, with all four alignments. |
This method writes a com file for an MBAE monte carlo conformation search run, in energy difference mode; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. If ComUtil.algn is true, then a the job will positions the ligands on the reference ligand, with all four alignments. |
This method writes a com file for an MBAE mixed lowmode monte carlo conformation search run, in energy difference mode; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. If ComUtil.algn is true, then a the job will positions the ligands on the reference ligand, with all four alignments. |
This method writes a com file for a multiple minimization with logP calculation; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a Free Energy Perturbation with stochastic dynamics sampling; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a protein LOOP conformation search; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a atom set interaction (ASET) analysis; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. The arguments for ASET must be set outside this method. Uses a BGIN/END loop to process each input file member, but single structure input files are allowed. |
This method writes a com file for a Mode integration MINTA calculation (conformational free energy); returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. |
This method writes a com file for a Rigid Rotor Harmonic Oscillator calculation (normal mode analysis of thermodyanic quantities); returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. The structure is minimized prior to RRHO calculation. The optimization can be omitted by setting MINI[3] = 0 |
This method writes a com file to visualize vibrational modes with VIBR; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. The structure is minimized prior to VIBR calculation. The optimization can be omitted by setting MINI[3] = 0 |
This method writes a com file to visualize vibrational modes with VBR2; returns the name of the com file written. It requires a string containing the name of a maestro format file that will be used as the job input, and returns the string name of the com file. It may also accept an optional string file name that becomes the name of the com file plus the root of the generated -out.mae file. The structure is minimized prior to VBR2 calculation. The optimization can be omitted by setting MINI[3] = 0 |
|
beautifyIf True don't write disabled opcds. If False, disabled opcds are printed as commented-out lines. Default is True
|
cgo3If True enable the writing of CGO3 to com files. By default bdco=True and the opcode is written if it appears in the list of opcodes.
|
cgo4If True enable the writing of CGO3 to com files. By default bdco=True and the opcode is written if it appears in the list of opcodes.
|
cgo5If True enable the writing of CGO5 to com files. By default bdco=True and the opcode is written if it appears in the list of opcodes.
|
cgo6If True enable the writing of CGO6 to com files. By default bdco=True and the opcode is written if it appears in the list of opcodes.
|
mmodIf True enable MMOD and write MacroModel/Maestro interaction-monitor files. This is seldom useful in a script context, but is provided to as an option to make com files look more like Maestro generated files. Default is False.
|
refit_argsIf True reformat large float value to fit in the alternate field format (%6.3f - %9.0f). If False, values are printed as %5.4f Default is True.
|
structure_file_extDefault structure file extention for file names automatically determined by outComFile(). Default is '.mae'.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Oct 26 00:59:48 2016 | http://epydoc.sourceforge.net |