Package schrodinger :: Package application :: Package matsci :: Package nano :: Module particle :: Class Nanoparticle
[hide private]
[frames] | no frames]

Class Nanoparticle

object --+
         |
        Nanoparticle

Manage the building of a nanoparticle.

Instance Methods [hide private]
 
__init__(self, supercell, shape='cube', origin=None, params=None, overwrite_vertices=[], primary_alignment_dict=OrderedDict([('axis', '1'), ('vector', '1.0 0.0 0.0'), ('basis..., secondary_alignment_dict=OrderedDict([('axis', '1'), ('vector', '0.0 1.0 0.0'), ('basis..., include_axes=False, term_frag='hydrogen', term_bond_length=1.5, allow_fragments=False, logger=None, no_term_faces=None)
Create an instance.
 
checkInput(self)
Check user input.
 
setMoleculeCompletion(self)
Set whether or not molecules should be completed at the nanoparticle boundary.
bool
isInside(self, aatom)
Return whether or not the given atom is inside the shape.
 
checkIntersectingBond(self, atom1, atom2)
Check if the bond given by the specified atoms can be intersected by the shape of nanoparticle.
 
partitionAtoms(self)
Return three non-overlapping lists of atom indices, (1) for atoms inside the shape, (2) for atoms belonging to bonds which intersect the shape boundary (a (inside, outside) tuple of atom indices for the intersecting bonds), and (3) for atoms that lie outside of shape.
 
removeAndRenumber(self, to_remove=None, renumber_map=None)
Remove the specified atoms from the nanoparticle and renumber all collections of indices or just renumber the collections using the specified renumber map.
 
cutAwayExcess(self)
Remove the unneeded atoms from the crystalline supercell.
 
handleOneToMany(self, inside_index, outside_indices)
Handle the one to many situation, i.e.
list
handleManyToOne(self, inside_indices, outside_index)
Handle the many to one situation, i.e.
 
configureBonds(self)
Configure the nanoparticle bonds that intersect the shape.
 
doTermination(self)
Terminate the nanoparticle.
 
setNanoparticleProperties(self)
Set nanoparticle properties.
 
printParams(self)
Log the parameters.
numpy.array
getAlignmentVector(self, alignment_dict)
Return the alignment vector.
 
translateToPlane(self)
Translate the shape object so that the reference face is coplanar with the requested crystal plane.
 
overwriteVertices(self)
Overwrite the vertices of the shape object.
 
runIt(self, template_only=False)
Create the nanoparticle.

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

Class Variables [hide private]
  MSGWIDTH = 100
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, supercell, shape='cube', origin=None, params=None, overwrite_vertices=[], primary_alignment_dict=OrderedDict([('axis', '1'), ('vector', '1.0 0.0 0.0'), ('basis..., secondary_alignment_dict=OrderedDict([('axis', '1'), ('vector', '0.0 1.0 0.0'), ('basis..., include_axes=False, term_frag='hydrogen', term_bond_length=1.5, allow_fragments=False, logger=None, no_term_faces=None)
(Constructor)

 

Create an instance.

Parameters:
  • supercell (schrodinger.structure.Structure) - the crystalline supercell from which to cut the nanaparticle
  • shape (str) - the shape of the nanoparticle
  • origin (list) - list of three floats specifying the origin of the shape in the crystal
  • params (list) - list of parameters defining the specified shape
  • overwrite_vertices (list) - vertices to overwrite those of the created shape, just of list of floats
  • primary_alignment_dict (dict) - a dictionary defining the primary alignment
  • secondary_alignment_dict (dict) - a dictionary defining the secondary alignment
  • include_axes (bool) - include unit vectors for the primary and secondary alignment axes in the template
  • term_frag (str) - the fragment by which to terminate the nanoparticle
  • term_bond_length (float) - the bond length of the bond connecting the nanoparticle with the fragment
  • allow_fragments (bool) - specify if molecular fragments are allowed at the boundary of the nanoparticle
  • logger (logging.Logger) - output logger
  • no_term_faces (list) - by default when terminating polyhedral nanoparticles all faces are considered, this option specifies that the given integer faces not be terminated (integers start at zero)
Overrides: object.__init__

isInside(self, aatom)

 

Return whether or not the given atom is inside the shape. If the given atom has not yet been categorized then categorize it and append the result to the collections.

Parameters:
Returns: bool
True if the atom is inside the shape, False otherwise

checkIntersectingBond(self, atom1, atom2)

 

Check if the bond given by the specified atoms can be intersected by the shape of nanoparticle. We will only be either keeping a single atom from this bond (no termination) or using it to terminate with a fragment that is expected to connect via a single bond.

Parameters:
  • atom1 (int) - the first atom index of the bond
  • atom2 (int) - the second atom index of the bond

removeAndRenumber(self, to_remove=None, renumber_map=None)

 

Remove the specified atoms from the nanoparticle and renumber all collections of indices or just renumber the collections using the specified renumber map.

Parameters:
  • to_remove (list or none) - indices of atoms to remove
  • renumber_map (dict or none) - a renumber map to use in renumbering collections

handleOneToMany(self, inside_index, outside_indices)

 

Handle the one to many situation, i.e. a single atom inside the region of interest bonded to multiple atoms outside of the region of interest.

Parameters:
  • inside_index (int) - the index of the inside atom
  • outside_indices (list) - the indices of the outside atoms

handleManyToOne(self, inside_indices, outside_index)

 

Handle the many to one situation, i.e. multiple atoms inside the region of interest are bonded to a single atom that is outside of the region of interest.

Parameters:
  • inside_indices (list) - the indices of the inside atoms
  • outside_index (int) - the index of the outside atom
Returns: list
contains (inside, outside) tuples of newly created bonds

getAlignmentVector(self, alignment_dict)

 

Return the alignment vector.

Parameters:
  • alignment_dict (dict) - defines the alignment
Returns: numpy.array
the vector on which to align

runIt(self, template_only=False)

 

Create the nanoparticle.

Parameters:
  • template_only (bool) - If True, the method will return immediately after the template is created and before the nanoparticle has been fully synthesized. Using this parameter means that the .template structure is valid but no .nanoparticle structure is created - the .nanoparticle property will be set to None.