schrodinger.application.matsci.packmol module¶
Utilities for working with packmol.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.matsci.packmol.PDBdata(pdbname, pdbres, resnum, chain_name, order)¶
Bases:
tuple
- __contains__(key, /)¶
Return key in self.
- __len__()¶
Return len(self).
- chain_name¶
Alias for field number 3
- count(value, /)¶
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)¶
Return first index of value.
Raises ValueError if the value is not present.
- order¶
Alias for field number 4
- pdbname¶
Alias for field number 0
- pdbres¶
Alias for field number 1
- resnum¶
Alias for field number 2
- class schrodinger.application.matsci.packmol.SurfactantInfo(st, name, packing_pct, number, layer, hydrophilic_idxs, hydrophobic_idxs, cion_st, cion_name)¶
Bases:
tuple
- __contains__(key, /)¶
Return key in self.
- __len__()¶
Return len(self).
- cion_name¶
Alias for field number 8
- cion_st¶
Alias for field number 7
- count(value, /)¶
Return number of occurrences of value.
- hydrophilic_idxs¶
Alias for field number 5
- hydrophobic_idxs¶
Alias for field number 6
- index(value, start=0, stop=9223372036854775807, /)¶
Return first index of value.
Raises ValueError if the value is not present.
- layer¶
Alias for field number 4
- name¶
Alias for field number 1
- number¶
Alias for field number 3
- packing_pct¶
Alias for field number 2
- st¶
Alias for field number 0
- class schrodinger.application.matsci.packmol.SolventInfo(st, name, packing_pct, number, layer)¶
Bases:
tuple
- __contains__(key, /)¶
Return key in self.
- __len__()¶
Return len(self).
- count(value, /)¶
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)¶
Return first index of value.
Raises ValueError if the value is not present.
- layer¶
Alias for field number 4
- name¶
Alias for field number 1
- number¶
Alias for field number 3
- packing_pct¶
Alias for field number 2
- st¶
Alias for field number 0
- class schrodinger.application.matsci.packmol.PackmolKw(value)¶
Bases:
schrodinger.StrEnum
Enum to hold packmol keywords.
- OUTPUT = 'output'¶
- FILETYPE = 'filetype'¶
- COMMENT = '#'¶
- STRUCTURE = 'structure'¶
- NUMBER = 'number'¶
- END = 'end'¶
- ATOMS = 'atoms'¶
- RADIUS = 'radius'¶
- INSIDE = 'inside'¶
- BOX = 'box'¶
- FIXED = 'fixed'¶
- SIDEMAX = 'sidemax'¶
- schrodinger.application.matsci.packmol.get_idxs(idxs_str)¶
Return integer indices from the given string of indices.
- Parameters
idxs_str (str) – the string of indices
- Return type
tuple
- Returns
the integer indices
- schrodinger.application.matsci.packmol.get_class_map()¶
Return the class map.
- Return type
dict
- Returns
the class map
- schrodinger.application.matsci.packmol.get_pdb_data(pdbname, pdbres, resnum=None, chain_name=None, order=None)¶
Return a PDBdata.
- Parameters
pdbname (str) – the PDB atom name
pdbres (str) – the PDB residue name
resnum (int or None) – the PDB residue number if needed
chain_name (str or None) – the PDB chain name if needed
order (int or None) – a bond order to be used when bonding to the atom corresponding to this object
- Return type
- Returns
the PDB data
- schrodinger.application.matsci.packmol.get_cg_radii_lines(st)¶
Return the coarse-grained radii body.
- Parameters
st (schrodinger.structure.Structure) – the structure
- Return type
list[str]
- Returns
list of the coarse-grain radii body lines
- class schrodinger.application.matsci.packmol.Job(*args, **kwargs)¶
Bases:
schrodinger.job.queue.SubprocessJob
- __init__(*args, **kwargs)¶
See parent class for documentation.
- doCommand(*args, **kwargs)¶
See parent class for documentation.
- postCommand()¶
See parent class for documentation.
- addFinalizer(function: Callable[[schrodinger.job.queue.BaseJob], None], run_dir: Optional[str] = None)¶
Add a function to be invoked when the job completes successfully.
See also the add_multi_job_finalizer function.
- addGroupPrereq(job: schrodinger.job.queue.BaseJob)¶
Make all jobs connected to
job
prerequisites of all jobs connected to this Job.
- addPrereq(job: schrodinger.job.queue.BaseJob)¶
Add a job that is an immediate prerequisite for this one.
- cancel()¶
Send termination request to subprocess managed job. This method will eventually deprecate SubprocessJob.kill
- finalize()¶
Clean up after a job successfully runs.
- genAllJobs(seen: Optional[Set[schrodinger.job.queue.BaseJob]] = None) Generator[schrodinger.job.queue.BaseJob, None, None] ¶
A generator that yields all jobs connected to this one.
- genAllPrereqs(seen=None) Generator[schrodinger.job.queue.BaseJob, None, None] ¶
A generator that yields all jobs that are prerequisites on this one.
- getCommand() List[str] ¶
Return the command used to run this job.
- getCommandDir() str ¶
Return the launch/command directory name. If None is returned, the job will be launched in the current directory.
- getDuration() Optional[int] ¶
Return the CPU time of the job in seconds.
If the job is still running, returns None.
- getJobDJ() schrodinger.job.queue.JobDJ ¶
Return the JobDJ instance that this job has been added to.
- getPrereqs()¶
Return a set of all immediate prerequisites for this job.
- getStatusStrings() Tuple[str, str, str] ¶
Return a tuple of status strings for printing by
JobDJ
.The strings returned are (status, jobid, host).
- hasExited() bool ¶
Returns True if this job finished, successfully or not.
- hasStarted() bool ¶
Returns True if this job has started (not waiting)
- init_count = 0¶
- isComplete() bool ¶
Returns True if this job finished successfully
- kill()¶
Send termination request to subprocess managed job.
- maxFailuresReached(msg: str)¶
This is a method that will be called after the job has failed and the maximum number of failures per
JobDJ
run has been reached. After invoking this method,JobDJ
will raise aRuntimeError
and the process will exit.
- preCommand()¶
A method to make pre-command changes, like cd’ing to the correct directory to run the command in.
- run(*args, **kwargs)¶
Run the job.
- The steps taken are as follows:
Execute the preCommand method for things like changing the working directory.
Call the doCommand to do the actual work of computation or job launching.
Call the postCommand method to undo the changes from the preCommand that need to be undone.
- runsLocally() bool ¶
Return True if the job runs on the
JobDJ
control host, False if not. Jobs that run locally don’t need hosts.There is no limit on the number of locally run jobs.
- setup()¶
A method to do initial setup; executed after
preCommand
, just beforedoCommand
.
- property state: schrodinger.job.queue.JobState¶
Return the current state of the job.
Note that this method can be overridden by subclasses that wish to provide for restartability at a higher level than unpickling
BaseJob
instances. For example, by examining some external condition (e.g. presence of output files) the state JobState.DONE could be returned immediately and the job would not run.
- update()¶
Update the current job status and set state.
- schrodinger.application.matsci.packmol.run(input_files, max_failures=None)¶
Run.
- Parameters
input_files (list) – packmol input files
max_failures (int) – Total number of allowed subjob failures before
JobDJ
exits. See schrodinger.job.queue.py::JobDJ for more docs.
- Return type
dict
- Returns
keys are input files, values are structure output files
- class schrodinger.application.matsci.packmol.PDBWriter(filename, reorder_by_sequence=False, first_occ=False, translate_pdb_resnames=True)¶
Bases:
schrodinger.structure._io.PDBWriter
- write(ct)¶
See parent class for documentation.
- __init__(filename, reorder_by_sequence=False, first_occ=False, translate_pdb_resnames=True)¶
Initialize needed mmlibs and open the file ‘filename’.
Note that the file will not be completely written until it is explicitly closed or the object is garbage collected.
- Parameters
filename (str) – The filename to write to.
reorder_by_sequence (bool) – Whether to re-order the residues by sequence before writing the PDB file.
first_occ (bool) – If True and there are alternate occupancy sites, only the first occupancy site will be included in the output PDB file. Otherwise, all occupancy sites will be included.
translate_pdb_resnames (bool) – If True, the pdb residue names get converted to a standard set. If False, the translation is turned off.
NOTE: Any existing file will be overwritten when the class instance is created.
- append(ct)¶
Alias to the write() method (for consistency with the other Writer classes).
- close()¶
Does nothing. Added for consistency with other Writer classes.
- setOption(option, value)¶
Set a single option for this writer. This method is meant for options that may not be supported for all writer formats. See the
StructureWriter
class documentation for details on the available options.Raises an OptionError subclass (either UnsupportedOption or UnsupportedOptionValue) if unsuccessful.
- Parameters
option (str) – The name of the option to set.
value – The value for the option. The data type of this parameter depends on the option being set.
- schrodinger.application.matsci.packmol.set_unique_pdb_atom_names(st)¶
Set unique PDB atom names on the given structure.
- Parameters
st (schrodinger.structure.Structure) – the structure
- schrodinger.application.matsci.packmol.has_imperfect_packing(log_fn)¶
Return True if the given packmol log file name indicates a solution with imperfect packing.
- Parameters
log_fn (str) – the packmol log file name
- Return type
bool
- Returns
True if there is imperfect packing
- schrodinger.application.matsci.packmol.set_pbc(st, a_len, b_len, c_len, log_fn=None, pbc_buffer=2, logger=None)¶
Set the PBC on the given structure.
- Parameters
st (
schrodinger.structure.Structure
) – the structure on which to set the PBCa_len (float) – the PBC length of the a-vector in Ang.
b_len (float) – the PBC length of the b-vector in Ang.
c_len (float) – the PBC length of the c-vector in Ang.
log_fn (str or None) – the packmol log file name to check if the given PBC can be used if there is one
pbc_buffer (float) – if the given PBC can not be used then determine it from the given structure and then add this buffer length
logger (logging.Logger or None) – output logger or None if there isn’t one
- schrodinger.application.matsci.packmol.add_atom_properties(pdb_st, mae_structs, props=('b_matsci_hydrophilic', 'b_matsci_hydrophobic', 'b_matsci_polymer_head_atom', 'b_matsci_polymer_tail_atom'))¶
Transfer the given properties from the mae structures to the structure created from pdb
- Parameters
pdb_st (schrodinger.structure.Structure) – the structure created from the pdb file
mae_structs (list(schrodinger.structure.Structure)) – the structures created from the mae files
props (list(str)) – the properties to transfer
- schrodinger.application.matsci.packmol.get_cells(input_files, sts, logger=None)¶
Return cells.
- Parameters
input_files (dict) – keys are packmol input files, values are tuples of the 3 box lengths (Angstrom) defining the PBC
sts (dict) – keys are file names (referenced in the given packmol input files), values are schrodinger.structure.Structure
logger (logging.Logger or None) – output logger or None if there isn’t one
- Raises
RuntimeError – if there is a problem with the input
- Return type
dict
- Returns
keys are input files, values are schrodinger.structure.Structure
- schrodinger.application.matsci.packmol.write_desmond_cells(input_files, sts, force_field=None, water_force_field='SPC', cg_ff_loc_type='local', logger=None)¶
Write Desmond cells.
- Parameters
input_files (dict) – keys are packmol input files, values are tuples of the 3 box lengths (Angstrom) defining the PBC
sts (dict) – keys are file names (referenced in the given packmol input files), values are schrodinger.structure.Structure
force_field (str) – name of FF to apply
water_force_field (str) – name of the water force field to apply, options are available in desmondutils
cg_ff_loc_type (str) – specifies the location to which to look for coarse-grained force field files, one of parserutils.INSTALLED_CG_FF_LOCATION_TYPE or parserutils.LOCAL_CG_FF_LOCATION_TYPE
logger (logging.Logger or None) – output logger or None if there isn’t one
- Raises
RuntimeError – if there is a problem with the input
- Return type
dict
- Returns
keys are input files, values are names of written Desmond
*cms
files
- schrodinger.application.matsci.packmol.set_unique_pdb_res_names(st)¶
Set unique PDB residue names on the given structure.
- Raises
RuntimeError – if there is a problem with the input
- Parameters
st (schrodinger.structure.Structure) – the structure
- schrodinger.application.matsci.packmol.unset_unique_pdb_res_names(st)¶
Unset unique PDB residue names on the given structure.
- Parameters
st (schrodinger.structure.Structure) – the structure
- schrodinger.application.matsci.packmol.group_infos_by_layer(infos)¶
Group the given information objects into a dictionary keyed by layer.
- Parameters
infos (list[
SurfactantInfo
] or list[SolventInfo
]) – contains surfactant or solvent infos- Return type
dict
- Returns
the information objects keyed by layer
- schrodinger.application.matsci.packmol.get_max_distance_btw_groups(st, idxs, jdxs)¶
Return the maximum distance (Angstrom) between the given groups of atom indices.
- Parameters
st (
schrodinger.structure.Structure
) – the structureidxs (tuple) – first group of atom indices
jdxs (tuple) – second group of atom indices
- Return type
float
- Returns
the maximum distance in Angstrom
- exception schrodinger.application.matsci.packmol.PackmolInputFileException¶
Bases:
Exception
- __init__(*args, **kwargs)¶
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class schrodinger.application.matsci.packmol.PackmolInputFile(tolerance=2, filetype='pdb', output_base_name='packmol', comment='', general_body='')¶
Bases:
object
Manage a packmol input file.
- IN_EXT = '.inp'¶
- __init__(tolerance=2, filetype='pdb', output_base_name='packmol', comment='', general_body='')¶
Create an instance.
- Parameters
tolerance (float) – the distance tolerance in Angstrom
filetype (str) – the file type to use for all structure files, pdb, tinker, xyz, or moldy
output_base_name (str) – the base name to use for the packmol output structure file
comment (str) – a comment placed at the top of the the packmol input file, include preceeding ‘#’
general_body (str) – the general body, should contain newlines, this is for any additional top level parameters that do not have to do with structures
- addStructureBody(base_name, body)¶
Add a structure body to the input file.
- Parameters
base_name (str) – the base name of the input structure file
body (str) – the body, should contain indentation and newlines
- addStructureBodies()¶
Add structure bodies to the input file.
- Raises
PackmolInputFileException – if there is an issue with the input
- write(input_base_name='packmol')¶
Write the packmol input file.
- Parameters
input_base_name (str) – the base name to use for the packmol input file
- Raises
PackmolInputFileException – if there is an issue with the input
- Return type
str
- Returns
the packmol input file name
- class schrodinger.application.matsci.packmol.StructuredLiquidInputFile(*args, **kwargs)¶
Bases:
schrodinger.application.matsci.packmol.PackmolInputFile
Manage a structured liquid input file.
- __init__(*args, **kwargs)¶
See parent class for documentation.
- check()¶
Check cell lengths.
- Raises
PackmolInputFileException – if there is an issue with the input
- prepare(cell_lengths, surfactant_infos, solvent_infos, layer_sep=1, packing_f=0.8, min_constraint_window_surfactant_idxs=25)¶
Prepare.
- Parameters
cell_lengths (tuple) – the cell lengths of the output structure file
surfactant_infos (list) – contains SurfactantInfo
solvent_infos (list) – contains SolventInfo
layer_sep (float) – the layer separation in Angstrom
packing_f (float) – a packing efficiency factor used to control the density of surfactant and solvent molecules
min_constraint_window_surfactant_idxs (float) – this is the minimum window length for constraining surfactant hydrophilic and hydrophobic indices as a percentage of the surfactant length, should be in (0, 50)
- Raises
PackmolInputFileException – if there is an issue with the input
- getMaxDists(all_infos)¶
Return a dictionary of maximum distances (Ang.) among the structures in each layer of the given all_infos.
- Parameters
all_infos (dict) – keys are layers, values are lists containing either SurfactantInfo or SolventInfo
- Return type
dict
- Returns
keys are layers, values are maximum distances
- getBoxSliceVol(cmin, cmax)¶
Return the box slice volume.
- Parameters
cmin (float) – the lower bound on the layer in Angstrom
cmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the box slice volume in Ang.^3
- getSphereSliceVol(rmin, rmax)¶
Return the sphere slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the sphere slice volume in Ang.^3
- getOutsideSphereVol(radius)¶
Return the box volume less the sphere volume.
- Parameters
radius (float) – the radius of the sphere in Angstrom
- Return type
float
- Returns
the box volume less the sphere volume in Ang.^3
- getCylinderSliceVol(rmin, rmax, length)¶
Return the cylinder slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the cylinder slice volume in Ang.^3
- getOutsideCylinderVol(radius, length)¶
Return the box volume less the cylinder volume.
- Parameters
radius (float) – the radius of the cylinder in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the box volume less the cylinder volume in Ang.^3
- getEllipsoidSliceVol(rmin, rmax)¶
Return the ellipsoid slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the ellipsoid slice volume in Ang.^3
- getOutsideEllipsoidVol(radius)¶
Return the box volume less the ellipsoid volume.
- Parameters
radius (float) – the radius of the ellipsoid in Angstrom, this is half the length of the minor axis
- Return type
float
- Returns
the box volume less the ellipsoid volume in Ang.^3
- getNumber(info, amin, amax)¶
Return the number of surfactant or solvent molecules to add for the given info.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
- Return type
int
- Returns
the number of molecules
- getLayerVolume(amin, amax, buffer_len=0)¶
Return the volume of this layer.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
buffer_len (float) – a buffer length in Angstrom
- Return type
int
- Returns
the volume in Ang.^3
- addLayer(info, amin, amax, hydrophilic_at_max=False, number=None, add_cion=False)¶
Add a layer.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
hydrophilic_at_max (bool) – if info is SurfactantInfo whether the hydrophilic atoms are to be located at the maximum
number (int or None) – the number of molecules to add, if None it will be determined
add_cion (bool) – if info is SurfactantInfo whether the layer is for the counter-ion
- getTotalSurfactantThickness(layers_are_bilayers=True)¶
Return the total surfactant thickness in Angstrom.
- Parameters
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float
- Returns
the total surfactant thickness in Angstrom
- getTotalCIonThickness()¶
Return the total counter-ion thickness in Angstrom.
- Return type
float
- Returns
the total counter-ion thickness in Angstrom
- getTotalNonSurfactantThickness()¶
Return the total non-surfactant thickness in Angstrom.
- Return type
float
- Returns
the total non-surfactant thickness in Angstrom
- addSurfactantBodies(start_dist, start_hydrophilic_at_max=False, layers=None, layers_are_bilayers=True)¶
Add surfactant bodies to the input file.
- Parameters
start_dist (float) – start adding surfactants at this distance in Angstrom
start_hydrophilic_at_max (bool) – specifies whether the hydrophilic atoms for the starting layer are to be located at the maximum
layers (list or None) – the surfactant layers to add, if None then all will be added
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float, bool
- Returns
surfactants stopped being added at this distance in Angstrom, whether the hydrophilic atoms for the final layer are located at the maximum
- addCIonBodies(start_dist, stop_dist, layers=None, factor=1)¶
Add counter-ion bodies to the input file.
- Parameters
start_dist (float) – start adding counter-ions at this distance in Angstrom
stop_dist (float) – stop adding counter-ions at this distance in Angstrom
layers (list or None) – the counter-ion layers to add, if None then all will be added
factor (float) – multiplies the corresponding number of surfactant molecules to set the number of counter-ions in the given region
- addSolventBodies(start_dist, stop_dist, layers=None, layer_sep=None)¶
Add solvent bodies to the input file.
- Parameters
start_dist (float) – start adding solvents at this distance in Angstrom
stop_dist (float) – stop adding solvents at this distance in Angstrom
layers (list or None) – the solvent layers to add, if None then all will be added
layer_sep (float) – the layer separation in Angstrom
- getSurfactantLayers()¶
Return a list of surfactant layers.
- Return type
list
- Returns
the surfactant layers
- getSolventLayers()¶
Return a list of solvent layers.
- Return type
list
- Returns
the solvent layers
- getConstraintType(parameter)¶
Return the constraint type.
- Parameters
parameter (float) – the parameter in Angstrom
- Return type
str
- Returns
the constraint type
- IN_EXT = '.inp'¶
- addStructureBodies()¶
Add structure bodies to the input file.
- Raises
PackmolInputFileException – if there is an issue with the input
- addStructureBody(base_name, body)¶
Add a structure body to the input file.
- Parameters
base_name (str) – the base name of the input structure file
body (str) – the body, should contain indentation and newlines
- write(input_base_name='packmol')¶
Write the packmol input file.
- Parameters
input_base_name (str) – the base name to use for the packmol input file
- Raises
PackmolInputFileException – if there is an issue with the input
- Return type
str
- Returns
the packmol input file name
- class schrodinger.application.matsci.packmol.MonolayerInputFile(*args, **kwargs)¶
Bases:
schrodinger.application.matsci.packmol.StructuredLiquidInputFile
Manage a monolayer input file.
- SURFACTANT_TOP_ATOM_CONSTRAINT = 'over'¶
- SURFACTANT_BOTTOM_ATOM_CONSTRAINT = 'below'¶
- CONSTRAINT_TYPE = 'plane 0 0 1 {parameter}'¶
- getMinCellLengths()¶
Return the minimum cell lengths.
- Return type
tuple
- Returns
a triple containing float and/or None, float is a minimum cell length in Angstrom, None indicates that there is no minimum
- check()¶
Check cell lengths.
- Raises
PackmolInputFileException – if there is an issue with the input
- getVol(amin, amax)¶
Return the volume.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the volume in Ang.^3
- getSurfactantConstraints(amin, amax)¶
Return the surfactant constraints.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
str
- Returns
the surfactant constraints
- getSolventConstraints(amin, amax)¶
Return the solvent constraints.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
str
- Returns
the solvent constraints
- addStructureBodies()¶
See parent class for documentation.
- IN_EXT = '.inp'¶
- __init__(*args, **kwargs)¶
See parent class for documentation.
- addCIonBodies(start_dist, stop_dist, layers=None, factor=1)¶
Add counter-ion bodies to the input file.
- Parameters
start_dist (float) – start adding counter-ions at this distance in Angstrom
stop_dist (float) – stop adding counter-ions at this distance in Angstrom
layers (list or None) – the counter-ion layers to add, if None then all will be added
factor (float) – multiplies the corresponding number of surfactant molecules to set the number of counter-ions in the given region
- addLayer(info, amin, amax, hydrophilic_at_max=False, number=None, add_cion=False)¶
Add a layer.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
hydrophilic_at_max (bool) – if info is SurfactantInfo whether the hydrophilic atoms are to be located at the maximum
number (int or None) – the number of molecules to add, if None it will be determined
add_cion (bool) – if info is SurfactantInfo whether the layer is for the counter-ion
- addSolventBodies(start_dist, stop_dist, layers=None, layer_sep=None)¶
Add solvent bodies to the input file.
- Parameters
start_dist (float) – start adding solvents at this distance in Angstrom
stop_dist (float) – stop adding solvents at this distance in Angstrom
layers (list or None) – the solvent layers to add, if None then all will be added
layer_sep (float) – the layer separation in Angstrom
- addStructureBody(base_name, body)¶
Add a structure body to the input file.
- Parameters
base_name (str) – the base name of the input structure file
body (str) – the body, should contain indentation and newlines
- addSurfactantBodies(start_dist, start_hydrophilic_at_max=False, layers=None, layers_are_bilayers=True)¶
Add surfactant bodies to the input file.
- Parameters
start_dist (float) – start adding surfactants at this distance in Angstrom
start_hydrophilic_at_max (bool) – specifies whether the hydrophilic atoms for the starting layer are to be located at the maximum
layers (list or None) – the surfactant layers to add, if None then all will be added
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float, bool
- Returns
surfactants stopped being added at this distance in Angstrom, whether the hydrophilic atoms for the final layer are located at the maximum
- getBoxSliceVol(cmin, cmax)¶
Return the box slice volume.
- Parameters
cmin (float) – the lower bound on the layer in Angstrom
cmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the box slice volume in Ang.^3
- getConstraintType(parameter)¶
Return the constraint type.
- Parameters
parameter (float) – the parameter in Angstrom
- Return type
str
- Returns
the constraint type
- getCylinderSliceVol(rmin, rmax, length)¶
Return the cylinder slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the cylinder slice volume in Ang.^3
- getEllipsoidSliceVol(rmin, rmax)¶
Return the ellipsoid slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the ellipsoid slice volume in Ang.^3
- getLayerVolume(amin, amax, buffer_len=0)¶
Return the volume of this layer.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
buffer_len (float) – a buffer length in Angstrom
- Return type
int
- Returns
the volume in Ang.^3
- getMaxDists(all_infos)¶
Return a dictionary of maximum distances (Ang.) among the structures in each layer of the given all_infos.
- Parameters
all_infos (dict) – keys are layers, values are lists containing either SurfactantInfo or SolventInfo
- Return type
dict
- Returns
keys are layers, values are maximum distances
- getNumber(info, amin, amax)¶
Return the number of surfactant or solvent molecules to add for the given info.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
- Return type
int
- Returns
the number of molecules
- getOutsideCylinderVol(radius, length)¶
Return the box volume less the cylinder volume.
- Parameters
radius (float) – the radius of the cylinder in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the box volume less the cylinder volume in Ang.^3
- getOutsideEllipsoidVol(radius)¶
Return the box volume less the ellipsoid volume.
- Parameters
radius (float) – the radius of the ellipsoid in Angstrom, this is half the length of the minor axis
- Return type
float
- Returns
the box volume less the ellipsoid volume in Ang.^3
- getOutsideSphereVol(radius)¶
Return the box volume less the sphere volume.
- Parameters
radius (float) – the radius of the sphere in Angstrom
- Return type
float
- Returns
the box volume less the sphere volume in Ang.^3
- getSolventLayers()¶
Return a list of solvent layers.
- Return type
list
- Returns
the solvent layers
- getSphereSliceVol(rmin, rmax)¶
Return the sphere slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the sphere slice volume in Ang.^3
- getSurfactantLayers()¶
Return a list of surfactant layers.
- Return type
list
- Returns
the surfactant layers
- getTotalCIonThickness()¶
Return the total counter-ion thickness in Angstrom.
- Return type
float
- Returns
the total counter-ion thickness in Angstrom
- getTotalNonSurfactantThickness()¶
Return the total non-surfactant thickness in Angstrom.
- Return type
float
- Returns
the total non-surfactant thickness in Angstrom
- getTotalSurfactantThickness(layers_are_bilayers=True)¶
Return the total surfactant thickness in Angstrom.
- Parameters
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float
- Returns
the total surfactant thickness in Angstrom
- prepare(cell_lengths, surfactant_infos, solvent_infos, layer_sep=1, packing_f=0.8, min_constraint_window_surfactant_idxs=25)¶
Prepare.
- Parameters
cell_lengths (tuple) – the cell lengths of the output structure file
surfactant_infos (list) – contains SurfactantInfo
solvent_infos (list) – contains SolventInfo
layer_sep (float) – the layer separation in Angstrom
packing_f (float) – a packing efficiency factor used to control the density of surfactant and solvent molecules
min_constraint_window_surfactant_idxs (float) – this is the minimum window length for constraining surfactant hydrophilic and hydrophobic indices as a percentage of the surfactant length, should be in (0, 50)
- Raises
PackmolInputFileException – if there is an issue with the input
- write(input_base_name='packmol')¶
Write the packmol input file.
- Parameters
input_base_name (str) – the base name to use for the packmol input file
- Raises
PackmolInputFileException – if there is an issue with the input
- Return type
str
- Returns
the packmol input file name
- class schrodinger.application.matsci.packmol.BilayerInputFile(*args, **kwargs)¶
Bases:
schrodinger.application.matsci.packmol.MonolayerInputFile
Manage a bilayer input file.
- getMinCellLengths()¶
Return the minimum cell lengths.
- Return type
tuple
- Returns
a triple containing float and/or None, float is a minimum cell length in Angstrom, None indicates that there is no minimum
- check()¶
Check cell lengths.
- Raises
PackmolInputFileException – if there is an issue with the input
- addStructureBodies()¶
See parent class for documentation.
- CONSTRAINT_TYPE = 'plane 0 0 1 {parameter}'¶
- IN_EXT = '.inp'¶
- SURFACTANT_BOTTOM_ATOM_CONSTRAINT = 'below'¶
- SURFACTANT_TOP_ATOM_CONSTRAINT = 'over'¶
- __init__(*args, **kwargs)¶
See parent class for documentation.
- addCIonBodies(start_dist, stop_dist, layers=None, factor=1)¶
Add counter-ion bodies to the input file.
- Parameters
start_dist (float) – start adding counter-ions at this distance in Angstrom
stop_dist (float) – stop adding counter-ions at this distance in Angstrom
layers (list or None) – the counter-ion layers to add, if None then all will be added
factor (float) – multiplies the corresponding number of surfactant molecules to set the number of counter-ions in the given region
- addLayer(info, amin, amax, hydrophilic_at_max=False, number=None, add_cion=False)¶
Add a layer.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
hydrophilic_at_max (bool) – if info is SurfactantInfo whether the hydrophilic atoms are to be located at the maximum
number (int or None) – the number of molecules to add, if None it will be determined
add_cion (bool) – if info is SurfactantInfo whether the layer is for the counter-ion
- addSolventBodies(start_dist, stop_dist, layers=None, layer_sep=None)¶
Add solvent bodies to the input file.
- Parameters
start_dist (float) – start adding solvents at this distance in Angstrom
stop_dist (float) – stop adding solvents at this distance in Angstrom
layers (list or None) – the solvent layers to add, if None then all will be added
layer_sep (float) – the layer separation in Angstrom
- addStructureBody(base_name, body)¶
Add a structure body to the input file.
- Parameters
base_name (str) – the base name of the input structure file
body (str) – the body, should contain indentation and newlines
- addSurfactantBodies(start_dist, start_hydrophilic_at_max=False, layers=None, layers_are_bilayers=True)¶
Add surfactant bodies to the input file.
- Parameters
start_dist (float) – start adding surfactants at this distance in Angstrom
start_hydrophilic_at_max (bool) – specifies whether the hydrophilic atoms for the starting layer are to be located at the maximum
layers (list or None) – the surfactant layers to add, if None then all will be added
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float, bool
- Returns
surfactants stopped being added at this distance in Angstrom, whether the hydrophilic atoms for the final layer are located at the maximum
- getBoxSliceVol(cmin, cmax)¶
Return the box slice volume.
- Parameters
cmin (float) – the lower bound on the layer in Angstrom
cmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the box slice volume in Ang.^3
- getConstraintType(parameter)¶
Return the constraint type.
- Parameters
parameter (float) – the parameter in Angstrom
- Return type
str
- Returns
the constraint type
- getCylinderSliceVol(rmin, rmax, length)¶
Return the cylinder slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the cylinder slice volume in Ang.^3
- getEllipsoidSliceVol(rmin, rmax)¶
Return the ellipsoid slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the ellipsoid slice volume in Ang.^3
- getLayerVolume(amin, amax, buffer_len=0)¶
Return the volume of this layer.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
buffer_len (float) – a buffer length in Angstrom
- Return type
int
- Returns
the volume in Ang.^3
- getMaxDists(all_infos)¶
Return a dictionary of maximum distances (Ang.) among the structures in each layer of the given all_infos.
- Parameters
all_infos (dict) – keys are layers, values are lists containing either SurfactantInfo or SolventInfo
- Return type
dict
- Returns
keys are layers, values are maximum distances
- getNumber(info, amin, amax)¶
Return the number of surfactant or solvent molecules to add for the given info.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
- Return type
int
- Returns
the number of molecules
- getOutsideCylinderVol(radius, length)¶
Return the box volume less the cylinder volume.
- Parameters
radius (float) – the radius of the cylinder in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the box volume less the cylinder volume in Ang.^3
- getOutsideEllipsoidVol(radius)¶
Return the box volume less the ellipsoid volume.
- Parameters
radius (float) – the radius of the ellipsoid in Angstrom, this is half the length of the minor axis
- Return type
float
- Returns
the box volume less the ellipsoid volume in Ang.^3
- getOutsideSphereVol(radius)¶
Return the box volume less the sphere volume.
- Parameters
radius (float) – the radius of the sphere in Angstrom
- Return type
float
- Returns
the box volume less the sphere volume in Ang.^3
- getSolventConstraints(amin, amax)¶
Return the solvent constraints.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
str
- Returns
the solvent constraints
- getSolventLayers()¶
Return a list of solvent layers.
- Return type
list
- Returns
the solvent layers
- getSphereSliceVol(rmin, rmax)¶
Return the sphere slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the sphere slice volume in Ang.^3
- getSurfactantConstraints(amin, amax)¶
Return the surfactant constraints.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
str
- Returns
the surfactant constraints
- getSurfactantLayers()¶
Return a list of surfactant layers.
- Return type
list
- Returns
the surfactant layers
- getTotalCIonThickness()¶
Return the total counter-ion thickness in Angstrom.
- Return type
float
- Returns
the total counter-ion thickness in Angstrom
- getTotalNonSurfactantThickness()¶
Return the total non-surfactant thickness in Angstrom.
- Return type
float
- Returns
the total non-surfactant thickness in Angstrom
- getTotalSurfactantThickness(layers_are_bilayers=True)¶
Return the total surfactant thickness in Angstrom.
- Parameters
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float
- Returns
the total surfactant thickness in Angstrom
- getVol(amin, amax)¶
Return the volume.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the volume in Ang.^3
- prepare(cell_lengths, surfactant_infos, solvent_infos, layer_sep=1, packing_f=0.8, min_constraint_window_surfactant_idxs=25)¶
Prepare.
- Parameters
cell_lengths (tuple) – the cell lengths of the output structure file
surfactant_infos (list) – contains SurfactantInfo
solvent_infos (list) – contains SolventInfo
layer_sep (float) – the layer separation in Angstrom
packing_f (float) – a packing efficiency factor used to control the density of surfactant and solvent molecules
min_constraint_window_surfactant_idxs (float) – this is the minimum window length for constraining surfactant hydrophilic and hydrophobic indices as a percentage of the surfactant length, should be in (0, 50)
- Raises
PackmolInputFileException – if there is an issue with the input
- write(input_base_name='packmol')¶
Write the packmol input file.
- Parameters
input_base_name (str) – the base name to use for the packmol input file
- Raises
PackmolInputFileException – if there is an issue with the input
- Return type
str
- Returns
the packmol input file name
- class schrodinger.application.matsci.packmol.MicelleInputFile(*args, **kwargs)¶
Bases:
schrodinger.application.matsci.packmol.StructuredLiquidInputFile
Manage a micelle input file.
- SURFACTANT_TOP_ATOM_CONSTRAINT = 'outside'¶
- SURFACTANT_BOTTOM_ATOM_CONSTRAINT = 'inside'¶
- CONSTRAINT_TYPE = 'sphere 0 0 0 {parameter}'¶
- getMinCellLengths()¶
Return the minimum cell lengths.
- Return type
tuple
- Returns
a triple containing float and/or None, float is a minimum cell length in Angstrom, None indicates that there is no minimum
- check()¶
Check cell lengths.
- Raises
PackmolInputFileException – if there is an issue with the input
- getRadius()¶
Return the radius.
- Return type
float
- Returns
the radius in Ang.
- getVol(amin, amax)¶
Return the volume.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the volume in Ang.^3
- getOutsideVol()¶
Return the outside volume.
- Return type
float
- Returns
the outside volume in Ang.^3
- getSurfactantConstraints(amin, amax)¶
Return the surfactant constraints.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
str
- Returns
the surfactant constraints
- getSolventConstraints(amin, amax)¶
Return the solvent constraints.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
str
- Returns
the solvent constraints
- addStructureBodies()¶
See parent class for documentation.
- IN_EXT = '.inp'¶
- __init__(*args, **kwargs)¶
See parent class for documentation.
- addCIonBodies(start_dist, stop_dist, layers=None, factor=1)¶
Add counter-ion bodies to the input file.
- Parameters
start_dist (float) – start adding counter-ions at this distance in Angstrom
stop_dist (float) – stop adding counter-ions at this distance in Angstrom
layers (list or None) – the counter-ion layers to add, if None then all will be added
factor (float) – multiplies the corresponding number of surfactant molecules to set the number of counter-ions in the given region
- addLayer(info, amin, amax, hydrophilic_at_max=False, number=None, add_cion=False)¶
Add a layer.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
hydrophilic_at_max (bool) – if info is SurfactantInfo whether the hydrophilic atoms are to be located at the maximum
number (int or None) – the number of molecules to add, if None it will be determined
add_cion (bool) – if info is SurfactantInfo whether the layer is for the counter-ion
- addSolventBodies(start_dist, stop_dist, layers=None, layer_sep=None)¶
Add solvent bodies to the input file.
- Parameters
start_dist (float) – start adding solvents at this distance in Angstrom
stop_dist (float) – stop adding solvents at this distance in Angstrom
layers (list or None) – the solvent layers to add, if None then all will be added
layer_sep (float) – the layer separation in Angstrom
- addStructureBody(base_name, body)¶
Add a structure body to the input file.
- Parameters
base_name (str) – the base name of the input structure file
body (str) – the body, should contain indentation and newlines
- addSurfactantBodies(start_dist, start_hydrophilic_at_max=False, layers=None, layers_are_bilayers=True)¶
Add surfactant bodies to the input file.
- Parameters
start_dist (float) – start adding surfactants at this distance in Angstrom
start_hydrophilic_at_max (bool) – specifies whether the hydrophilic atoms for the starting layer are to be located at the maximum
layers (list or None) – the surfactant layers to add, if None then all will be added
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float, bool
- Returns
surfactants stopped being added at this distance in Angstrom, whether the hydrophilic atoms for the final layer are located at the maximum
- getBoxSliceVol(cmin, cmax)¶
Return the box slice volume.
- Parameters
cmin (float) – the lower bound on the layer in Angstrom
cmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the box slice volume in Ang.^3
- getConstraintType(parameter)¶
Return the constraint type.
- Parameters
parameter (float) – the parameter in Angstrom
- Return type
str
- Returns
the constraint type
- getCylinderSliceVol(rmin, rmax, length)¶
Return the cylinder slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the cylinder slice volume in Ang.^3
- getEllipsoidSliceVol(rmin, rmax)¶
Return the ellipsoid slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the ellipsoid slice volume in Ang.^3
- getLayerVolume(amin, amax, buffer_len=0)¶
Return the volume of this layer.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
buffer_len (float) – a buffer length in Angstrom
- Return type
int
- Returns
the volume in Ang.^3
- getMaxDists(all_infos)¶
Return a dictionary of maximum distances (Ang.) among the structures in each layer of the given all_infos.
- Parameters
all_infos (dict) – keys are layers, values are lists containing either SurfactantInfo or SolventInfo
- Return type
dict
- Returns
keys are layers, values are maximum distances
- getNumber(info, amin, amax)¶
Return the number of surfactant or solvent molecules to add for the given info.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
- Return type
int
- Returns
the number of molecules
- getOutsideCylinderVol(radius, length)¶
Return the box volume less the cylinder volume.
- Parameters
radius (float) – the radius of the cylinder in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the box volume less the cylinder volume in Ang.^3
- getOutsideEllipsoidVol(radius)¶
Return the box volume less the ellipsoid volume.
- Parameters
radius (float) – the radius of the ellipsoid in Angstrom, this is half the length of the minor axis
- Return type
float
- Returns
the box volume less the ellipsoid volume in Ang.^3
- getOutsideSphereVol(radius)¶
Return the box volume less the sphere volume.
- Parameters
radius (float) – the radius of the sphere in Angstrom
- Return type
float
- Returns
the box volume less the sphere volume in Ang.^3
- getSolventLayers()¶
Return a list of solvent layers.
- Return type
list
- Returns
the solvent layers
- getSphereSliceVol(rmin, rmax)¶
Return the sphere slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the sphere slice volume in Ang.^3
- getSurfactantLayers()¶
Return a list of surfactant layers.
- Return type
list
- Returns
the surfactant layers
- getTotalCIonThickness()¶
Return the total counter-ion thickness in Angstrom.
- Return type
float
- Returns
the total counter-ion thickness in Angstrom
- getTotalNonSurfactantThickness()¶
Return the total non-surfactant thickness in Angstrom.
- Return type
float
- Returns
the total non-surfactant thickness in Angstrom
- getTotalSurfactantThickness(layers_are_bilayers=True)¶
Return the total surfactant thickness in Angstrom.
- Parameters
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float
- Returns
the total surfactant thickness in Angstrom
- prepare(cell_lengths, surfactant_infos, solvent_infos, layer_sep=1, packing_f=0.8, min_constraint_window_surfactant_idxs=25)¶
Prepare.
- Parameters
cell_lengths (tuple) – the cell lengths of the output structure file
surfactant_infos (list) – contains SurfactantInfo
solvent_infos (list) – contains SolventInfo
layer_sep (float) – the layer separation in Angstrom
packing_f (float) – a packing efficiency factor used to control the density of surfactant and solvent molecules
min_constraint_window_surfactant_idxs (float) – this is the minimum window length for constraining surfactant hydrophilic and hydrophobic indices as a percentage of the surfactant length, should be in (0, 50)
- Raises
PackmolInputFileException – if there is an issue with the input
- write(input_base_name='packmol')¶
Write the packmol input file.
- Parameters
input_base_name (str) – the base name to use for the packmol input file
- Raises
PackmolInputFileException – if there is an issue with the input
- Return type
str
- Returns
the packmol input file name
- class schrodinger.application.matsci.packmol.LiposomeInputFile(*args, **kwargs)¶
Bases:
schrodinger.application.matsci.packmol.MicelleInputFile
Manage a liposome input file.
- prepare(*args, **kwargs)¶
See parent class for documentation.
- Parameters
radius (float) – the radius of the liposome in Ang.
- getMinRadius()¶
Return the minimum radius.
- Return type
float
- Returns
the minimum radius in Angstrom
- check()¶
Check cell lengths.
- Raises
PackmolInputFileException – if there is an issue with the input
- getRadius()¶
Return the radius.
- Return type
float
- Returns
the radius in Ang.
- getInnerRadius()¶
Return the inner radius.
- Return type
float
- Returns
the inner radius in Ang.
- getSolventConstraints(amin, amax)¶
Return the solvent constraints.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
- Return type
str
- Returns
the constraints
- addStructureBodies()¶
See parent class for documentation.
- CONSTRAINT_TYPE = 'sphere 0 0 0 {parameter}'¶
- IN_EXT = '.inp'¶
- SURFACTANT_BOTTOM_ATOM_CONSTRAINT = 'inside'¶
- SURFACTANT_TOP_ATOM_CONSTRAINT = 'outside'¶
- __init__(*args, **kwargs)¶
See parent class for documentation.
- addCIonBodies(start_dist, stop_dist, layers=None, factor=1)¶
Add counter-ion bodies to the input file.
- Parameters
start_dist (float) – start adding counter-ions at this distance in Angstrom
stop_dist (float) – stop adding counter-ions at this distance in Angstrom
layers (list or None) – the counter-ion layers to add, if None then all will be added
factor (float) – multiplies the corresponding number of surfactant molecules to set the number of counter-ions in the given region
- addLayer(info, amin, amax, hydrophilic_at_max=False, number=None, add_cion=False)¶
Add a layer.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
hydrophilic_at_max (bool) – if info is SurfactantInfo whether the hydrophilic atoms are to be located at the maximum
number (int or None) – the number of molecules to add, if None it will be determined
add_cion (bool) – if info is SurfactantInfo whether the layer is for the counter-ion
- addSolventBodies(start_dist, stop_dist, layers=None, layer_sep=None)¶
Add solvent bodies to the input file.
- Parameters
start_dist (float) – start adding solvents at this distance in Angstrom
stop_dist (float) – stop adding solvents at this distance in Angstrom
layers (list or None) – the solvent layers to add, if None then all will be added
layer_sep (float) – the layer separation in Angstrom
- addStructureBody(base_name, body)¶
Add a structure body to the input file.
- Parameters
base_name (str) – the base name of the input structure file
body (str) – the body, should contain indentation and newlines
- addSurfactantBodies(start_dist, start_hydrophilic_at_max=False, layers=None, layers_are_bilayers=True)¶
Add surfactant bodies to the input file.
- Parameters
start_dist (float) – start adding surfactants at this distance in Angstrom
start_hydrophilic_at_max (bool) – specifies whether the hydrophilic atoms for the starting layer are to be located at the maximum
layers (list or None) – the surfactant layers to add, if None then all will be added
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float, bool
- Returns
surfactants stopped being added at this distance in Angstrom, whether the hydrophilic atoms for the final layer are located at the maximum
- getBoxSliceVol(cmin, cmax)¶
Return the box slice volume.
- Parameters
cmin (float) – the lower bound on the layer in Angstrom
cmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the box slice volume in Ang.^3
- getConstraintType(parameter)¶
Return the constraint type.
- Parameters
parameter (float) – the parameter in Angstrom
- Return type
str
- Returns
the constraint type
- getCylinderSliceVol(rmin, rmax, length)¶
Return the cylinder slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the cylinder slice volume in Ang.^3
- getEllipsoidSliceVol(rmin, rmax)¶
Return the ellipsoid slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the ellipsoid slice volume in Ang.^3
- getLayerVolume(amin, amax, buffer_len=0)¶
Return the volume of this layer.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
buffer_len (float) – a buffer length in Angstrom
- Return type
int
- Returns
the volume in Ang.^3
- getMaxDists(all_infos)¶
Return a dictionary of maximum distances (Ang.) among the structures in each layer of the given all_infos.
- Parameters
all_infos (dict) – keys are layers, values are lists containing either SurfactantInfo or SolventInfo
- Return type
dict
- Returns
keys are layers, values are maximum distances
- getMinCellLengths()¶
Return the minimum cell lengths.
- Return type
tuple
- Returns
a triple containing float and/or None, float is a minimum cell length in Angstrom, None indicates that there is no minimum
- getNumber(info, amin, amax)¶
Return the number of surfactant or solvent molecules to add for the given info.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
- Return type
int
- Returns
the number of molecules
- getOutsideCylinderVol(radius, length)¶
Return the box volume less the cylinder volume.
- Parameters
radius (float) – the radius of the cylinder in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the box volume less the cylinder volume in Ang.^3
- getOutsideEllipsoidVol(radius)¶
Return the box volume less the ellipsoid volume.
- Parameters
radius (float) – the radius of the ellipsoid in Angstrom, this is half the length of the minor axis
- Return type
float
- Returns
the box volume less the ellipsoid volume in Ang.^3
- getOutsideSphereVol(radius)¶
Return the box volume less the sphere volume.
- Parameters
radius (float) – the radius of the sphere in Angstrom
- Return type
float
- Returns
the box volume less the sphere volume in Ang.^3
- getOutsideVol()¶
Return the outside volume.
- Return type
float
- Returns
the outside volume in Ang.^3
- getSolventLayers()¶
Return a list of solvent layers.
- Return type
list
- Returns
the solvent layers
- getSphereSliceVol(rmin, rmax)¶
Return the sphere slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the sphere slice volume in Ang.^3
- getSurfactantConstraints(amin, amax)¶
Return the surfactant constraints.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
str
- Returns
the surfactant constraints
- getSurfactantLayers()¶
Return a list of surfactant layers.
- Return type
list
- Returns
the surfactant layers
- getTotalCIonThickness()¶
Return the total counter-ion thickness in Angstrom.
- Return type
float
- Returns
the total counter-ion thickness in Angstrom
- getTotalNonSurfactantThickness()¶
Return the total non-surfactant thickness in Angstrom.
- Return type
float
- Returns
the total non-surfactant thickness in Angstrom
- getTotalSurfactantThickness(layers_are_bilayers=True)¶
Return the total surfactant thickness in Angstrom.
- Parameters
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float
- Returns
the total surfactant thickness in Angstrom
- getVol(amin, amax)¶
Return the volume.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the volume in Ang.^3
- write(input_base_name='packmol')¶
Write the packmol input file.
- Parameters
input_base_name (str) – the base name to use for the packmol input file
- Raises
PackmolInputFileException – if there is an issue with the input
- Return type
str
- Returns
the packmol input file name
- class schrodinger.application.matsci.packmol.WormlikeMicelleInputFile(*args, **kwargs)¶
Bases:
schrodinger.application.matsci.packmol.MicelleInputFile
Manage a wormlike micelle input file.
- CONSTRAINT_TYPE = 'cylinder 0 0 {bottom} 0 0 1 {parameter} {length}'¶
- getMinCellLengths()¶
Return the minimum cell lengths.
- Return type
tuple
- Returns
a triple containing float and/or None, float is a minimum cell length in Angstrom, None indicates that there is no minimum
- getVol(amin, amax)¶
Return the volume.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the volume in Ang.^3
- getOutsideVol()¶
Return the outside volume.
- Return type
float
- Returns
the outside volume in Ang.^3
- getConstraintType(parameter)¶
Return the constraint type.
- Parameters
parameter (float) – the parameter in Angstrom
- Return type
str
- Returns
the constraint type
- IN_EXT = '.inp'¶
- SURFACTANT_BOTTOM_ATOM_CONSTRAINT = 'inside'¶
- SURFACTANT_TOP_ATOM_CONSTRAINT = 'outside'¶
- __init__(*args, **kwargs)¶
See parent class for documentation.
- addCIonBodies(start_dist, stop_dist, layers=None, factor=1)¶
Add counter-ion bodies to the input file.
- Parameters
start_dist (float) – start adding counter-ions at this distance in Angstrom
stop_dist (float) – stop adding counter-ions at this distance in Angstrom
layers (list or None) – the counter-ion layers to add, if None then all will be added
factor (float) – multiplies the corresponding number of surfactant molecules to set the number of counter-ions in the given region
- addLayer(info, amin, amax, hydrophilic_at_max=False, number=None, add_cion=False)¶
Add a layer.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
hydrophilic_at_max (bool) – if info is SurfactantInfo whether the hydrophilic atoms are to be located at the maximum
number (int or None) – the number of molecules to add, if None it will be determined
add_cion (bool) – if info is SurfactantInfo whether the layer is for the counter-ion
- addSolventBodies(start_dist, stop_dist, layers=None, layer_sep=None)¶
Add solvent bodies to the input file.
- Parameters
start_dist (float) – start adding solvents at this distance in Angstrom
stop_dist (float) – stop adding solvents at this distance in Angstrom
layers (list or None) – the solvent layers to add, if None then all will be added
layer_sep (float) – the layer separation in Angstrom
- addStructureBodies()¶
See parent class for documentation.
- addStructureBody(base_name, body)¶
Add a structure body to the input file.
- Parameters
base_name (str) – the base name of the input structure file
body (str) – the body, should contain indentation and newlines
- addSurfactantBodies(start_dist, start_hydrophilic_at_max=False, layers=None, layers_are_bilayers=True)¶
Add surfactant bodies to the input file.
- Parameters
start_dist (float) – start adding surfactants at this distance in Angstrom
start_hydrophilic_at_max (bool) – specifies whether the hydrophilic atoms for the starting layer are to be located at the maximum
layers (list or None) – the surfactant layers to add, if None then all will be added
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float, bool
- Returns
surfactants stopped being added at this distance in Angstrom, whether the hydrophilic atoms for the final layer are located at the maximum
- check()¶
Check cell lengths.
- Raises
PackmolInputFileException – if there is an issue with the input
- getBoxSliceVol(cmin, cmax)¶
Return the box slice volume.
- Parameters
cmin (float) – the lower bound on the layer in Angstrom
cmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the box slice volume in Ang.^3
- getCylinderSliceVol(rmin, rmax, length)¶
Return the cylinder slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the cylinder slice volume in Ang.^3
- getEllipsoidSliceVol(rmin, rmax)¶
Return the ellipsoid slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the ellipsoid slice volume in Ang.^3
- getLayerVolume(amin, amax, buffer_len=0)¶
Return the volume of this layer.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
buffer_len (float) – a buffer length in Angstrom
- Return type
int
- Returns
the volume in Ang.^3
- getMaxDists(all_infos)¶
Return a dictionary of maximum distances (Ang.) among the structures in each layer of the given all_infos.
- Parameters
all_infos (dict) – keys are layers, values are lists containing either SurfactantInfo or SolventInfo
- Return type
dict
- Returns
keys are layers, values are maximum distances
- getNumber(info, amin, amax)¶
Return the number of surfactant or solvent molecules to add for the given info.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
- Return type
int
- Returns
the number of molecules
- getOutsideCylinderVol(radius, length)¶
Return the box volume less the cylinder volume.
- Parameters
radius (float) – the radius of the cylinder in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the box volume less the cylinder volume in Ang.^3
- getOutsideEllipsoidVol(radius)¶
Return the box volume less the ellipsoid volume.
- Parameters
radius (float) – the radius of the ellipsoid in Angstrom, this is half the length of the minor axis
- Return type
float
- Returns
the box volume less the ellipsoid volume in Ang.^3
- getOutsideSphereVol(radius)¶
Return the box volume less the sphere volume.
- Parameters
radius (float) – the radius of the sphere in Angstrom
- Return type
float
- Returns
the box volume less the sphere volume in Ang.^3
- getRadius()¶
Return the radius.
- Return type
float
- Returns
the radius in Ang.
- getSolventConstraints(amin, amax)¶
Return the solvent constraints.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
str
- Returns
the solvent constraints
- getSolventLayers()¶
Return a list of solvent layers.
- Return type
list
- Returns
the solvent layers
- getSphereSliceVol(rmin, rmax)¶
Return the sphere slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the sphere slice volume in Ang.^3
- getSurfactantConstraints(amin, amax)¶
Return the surfactant constraints.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
str
- Returns
the surfactant constraints
- getSurfactantLayers()¶
Return a list of surfactant layers.
- Return type
list
- Returns
the surfactant layers
- getTotalCIonThickness()¶
Return the total counter-ion thickness in Angstrom.
- Return type
float
- Returns
the total counter-ion thickness in Angstrom
- getTotalNonSurfactantThickness()¶
Return the total non-surfactant thickness in Angstrom.
- Return type
float
- Returns
the total non-surfactant thickness in Angstrom
- getTotalSurfactantThickness(layers_are_bilayers=True)¶
Return the total surfactant thickness in Angstrom.
- Parameters
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float
- Returns
the total surfactant thickness in Angstrom
- prepare(cell_lengths, surfactant_infos, solvent_infos, layer_sep=1, packing_f=0.8, min_constraint_window_surfactant_idxs=25)¶
Prepare.
- Parameters
cell_lengths (tuple) – the cell lengths of the output structure file
surfactant_infos (list) – contains SurfactantInfo
solvent_infos (list) – contains SolventInfo
layer_sep (float) – the layer separation in Angstrom
packing_f (float) – a packing efficiency factor used to control the density of surfactant and solvent molecules
min_constraint_window_surfactant_idxs (float) – this is the minimum window length for constraining surfactant hydrophilic and hydrophobic indices as a percentage of the surfactant length, should be in (0, 50)
- Raises
PackmolInputFileException – if there is an issue with the input
- write(input_base_name='packmol')¶
Write the packmol input file.
- Parameters
input_base_name (str) – the base name to use for the packmol input file
- Raises
PackmolInputFileException – if there is an issue with the input
- Return type
str
- Returns
the packmol input file name
- class schrodinger.application.matsci.packmol.ElongatedMicelleInputFile(*args, **kwargs)¶
Bases:
schrodinger.application.matsci.packmol.MicelleInputFile
Manage an elongated micelle input file.
- CONSTRAINT_TYPE = 'ellipsoid 0 0 0 {parameter} {parameter} {parameter_p} 1'¶
- prepare(*args, **kwargs)¶
See parent class for documentation.
- Parameters
factor (float) – the scale factor for the principal axis
- getMinCellLengths()¶
Return the minimum cell lengths.
- Return type
tuple
- Returns
a triple containing float and/or None, float is a minimum cell length in Angstrom, None indicates that there is no minimum
- getMajorRadius()¶
Return the major radius.
- Return type
float
- Returns
the major radius in Ang.
- getVol(amin, amax)¶
Return the volume.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the volume in Ang.^3
- getOutsideVol()¶
Return the outside volume.
- Return type
float
- Returns
the outside volume in Ang.^3
- getConstraintType(parameter)¶
Return the constraint type.
- Parameters
parameter (float) – the parameter in Angstrom
- Return type
str
- Returns
the constraint type
- IN_EXT = '.inp'¶
- SURFACTANT_BOTTOM_ATOM_CONSTRAINT = 'inside'¶
- SURFACTANT_TOP_ATOM_CONSTRAINT = 'outside'¶
- __init__(*args, **kwargs)¶
See parent class for documentation.
- addCIonBodies(start_dist, stop_dist, layers=None, factor=1)¶
Add counter-ion bodies to the input file.
- Parameters
start_dist (float) – start adding counter-ions at this distance in Angstrom
stop_dist (float) – stop adding counter-ions at this distance in Angstrom
layers (list or None) – the counter-ion layers to add, if None then all will be added
factor (float) – multiplies the corresponding number of surfactant molecules to set the number of counter-ions in the given region
- addLayer(info, amin, amax, hydrophilic_at_max=False, number=None, add_cion=False)¶
Add a layer.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
hydrophilic_at_max (bool) – if info is SurfactantInfo whether the hydrophilic atoms are to be located at the maximum
number (int or None) – the number of molecules to add, if None it will be determined
add_cion (bool) – if info is SurfactantInfo whether the layer is for the counter-ion
- addSolventBodies(start_dist, stop_dist, layers=None, layer_sep=None)¶
Add solvent bodies to the input file.
- Parameters
start_dist (float) – start adding solvents at this distance in Angstrom
stop_dist (float) – stop adding solvents at this distance in Angstrom
layers (list or None) – the solvent layers to add, if None then all will be added
layer_sep (float) – the layer separation in Angstrom
- addStructureBodies()¶
See parent class for documentation.
- addStructureBody(base_name, body)¶
Add a structure body to the input file.
- Parameters
base_name (str) – the base name of the input structure file
body (str) – the body, should contain indentation and newlines
- addSurfactantBodies(start_dist, start_hydrophilic_at_max=False, layers=None, layers_are_bilayers=True)¶
Add surfactant bodies to the input file.
- Parameters
start_dist (float) – start adding surfactants at this distance in Angstrom
start_hydrophilic_at_max (bool) – specifies whether the hydrophilic atoms for the starting layer are to be located at the maximum
layers (list or None) – the surfactant layers to add, if None then all will be added
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float, bool
- Returns
surfactants stopped being added at this distance in Angstrom, whether the hydrophilic atoms for the final layer are located at the maximum
- check()¶
Check cell lengths.
- Raises
PackmolInputFileException – if there is an issue with the input
- getBoxSliceVol(cmin, cmax)¶
Return the box slice volume.
- Parameters
cmin (float) – the lower bound on the layer in Angstrom
cmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the box slice volume in Ang.^3
- getCylinderSliceVol(rmin, rmax, length)¶
Return the cylinder slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the cylinder slice volume in Ang.^3
- getEllipsoidSliceVol(rmin, rmax)¶
Return the ellipsoid slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the ellipsoid slice volume in Ang.^3
- getLayerVolume(amin, amax, buffer_len=0)¶
Return the volume of this layer.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
buffer_len (float) – a buffer length in Angstrom
- Return type
int
- Returns
the volume in Ang.^3
- getMaxDists(all_infos)¶
Return a dictionary of maximum distances (Ang.) among the structures in each layer of the given all_infos.
- Parameters
all_infos (dict) – keys are layers, values are lists containing either SurfactantInfo or SolventInfo
- Return type
dict
- Returns
keys are layers, values are maximum distances
- getNumber(info, amin, amax)¶
Return the number of surfactant or solvent molecules to add for the given info.
- Parameters
info (SurfactantInfo or SolventInfo) – the info object for this layer
amin (float) – the lower bound on the layer in Angstrom
amax (float or None) – the upper bound on the layer in Angstrom or None if there isn’t one in which case the remaining outermost space of the cell will be used
- Return type
int
- Returns
the number of molecules
- getOutsideCylinderVol(radius, length)¶
Return the box volume less the cylinder volume.
- Parameters
radius (float) – the radius of the cylinder in Angstrom
length (float) – the length of the cylinder in Angstrom
- Return type
float
- Returns
the box volume less the cylinder volume in Ang.^3
- getOutsideEllipsoidVol(radius)¶
Return the box volume less the ellipsoid volume.
- Parameters
radius (float) – the radius of the ellipsoid in Angstrom, this is half the length of the minor axis
- Return type
float
- Returns
the box volume less the ellipsoid volume in Ang.^3
- getOutsideSphereVol(radius)¶
Return the box volume less the sphere volume.
- Parameters
radius (float) – the radius of the sphere in Angstrom
- Return type
float
- Returns
the box volume less the sphere volume in Ang.^3
- getRadius()¶
Return the radius.
- Return type
float
- Returns
the radius in Ang.
- getSolventConstraints(amin, amax)¶
Return the solvent constraints.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
str
- Returns
the solvent constraints
- getSolventLayers()¶
Return a list of solvent layers.
- Return type
list
- Returns
the solvent layers
- getSphereSliceVol(rmin, rmax)¶
Return the sphere slice volume.
- Parameters
rmin (float) – the lower bound on the layer in Angstrom
rmax (float) – the upper bound on the layer in Angstrom
- Return type
float
- Returns
the sphere slice volume in Ang.^3
- getSurfactantConstraints(amin, amax)¶
Return the surfactant constraints.
- Parameters
amin (float) – the lower bound on the layer in Angstrom
amax (float) – the upper bound on the layer in Angstrom
- Return type
str
- Returns
the surfactant constraints
- getSurfactantLayers()¶
Return a list of surfactant layers.
- Return type
list
- Returns
the surfactant layers
- getTotalCIonThickness()¶
Return the total counter-ion thickness in Angstrom.
- Return type
float
- Returns
the total counter-ion thickness in Angstrom
- getTotalNonSurfactantThickness()¶
Return the total non-surfactant thickness in Angstrom.
- Return type
float
- Returns
the total non-surfactant thickness in Angstrom
- getTotalSurfactantThickness(layers_are_bilayers=True)¶
Return the total surfactant thickness in Angstrom.
- Parameters
layers_are_bilayers (bool) – whether layers are bilayers
- Return type
float
- Returns
the total surfactant thickness in Angstrom
- write(input_base_name='packmol')¶
Write the packmol input file.
- Parameters
input_base_name (str) – the base name to use for the packmol input file
- Raises
PackmolInputFileException – if there is an issue with the input
- Return type
str
- Returns
the packmol input file name
- schrodinger.application.matsci.packmol.get_writer(surfactant_infos, solvent_infos, base_name, seed, n_loop, cell_lengths, packing_f, model_type, **kwargs)¶
Get the writer.
- Parameters
surfactant_infos (list[
SurfactantInfo
]) – contains surfactant infossolvent_infos (list[
SolventInfo
]) – contains solvent infosbase_name (str) – base name used for output file naming
seed (int) – seed for random
n_loop (int) – the number of packmol loops
cell_lengths (tuple[float]) – the cell lengths in Angstrom
packing_f (float) – the packing factor
model_type (str) – the model type, a key in the class map
- Return type
- Returns
the writer
- schrodinger.application.matsci.packmol.get_parser(description, packmol_input=True)¶
Get the command line argument parser.
- Parameters
description (str) – the description
packmol_input (bool) – whether the input is a packmol input file
- Return type
- Returns
command line argument parser
- schrodinger.application.matsci.packmol.get_job_spec_from_args(argv, description, program_name='Structured Liquid', default_job_name='structured_liquid', packmol_input=True)¶
Return a JobSpecification.
- Parameters
argv (list) – command line arguments including the script name at [0]
description (str) – the description
program_name (str) – the program name
default_job_name (str) – the default job name
packmol_input (bool) – whether the input is a packmol input file
- Return type
- Returns
the JobSpecification
- schrodinger.application.matsci.packmol.main(description, *args, default_job_name='structured_liquid')¶
Main function used by drivers to run packmol.
- Parameters
description (str) – the parser description
default_job_name (str) – the default job name
- schrodinger.application.matsci.packmol.get_surfactant_infos(slb_dict)¶
Return surfactant information from the given dictionary of structured liquid builder options. Maestro files referenced within must exist in the current working directory.
- Parameters
slb_dict (dict) – contains structured liquid builder options
- Raises
RuntimeError – if there is an issue
- Return type
list[SurfactantInfo], list[str]
- Returns
the surfactant information objects and any extra structure file flags
- schrodinger.application.matsci.packmol.get_solvent_infos(slb_dict)¶
Return solvent information from the given dictionary of structured liquid builder options. Maestro files referenced within must exist in the current working directory.
- Parameters
slb_dict (dict) – contains structured liquid builder options
- Raises
RuntimeError – if there is an issue
- Return type
list[SolventInfo]
- Returns
the solvent information objects
- schrodinger.application.matsci.packmol.write_packmol_input_file(slb_dict, box_lengths)¶
Write the packmol input file from the given dictionary of structured liquid builder options.
- Parameters
slb_dict (dict) – contains structured liquid builder options
box_lengths (tuple[float]) – the cell lengths in Angstrom
- Raises
RuntimeError – if there is an issue
- Return type
str, list[str]
- Returns
the packmol input file name and any extra structure file flags