v6.0.0 docs — cloud-only, subscription (fullrmc.com). Free download: v4.1.1.

fullrmc.SystemBuilderUtils module

This module provides builders used to generate the initial atomic configuration (pdb) that a fullrmc Engine will optimize. It covers amorphous systems and nanoparticles built by randomly inserting and orienting molecular building blocks, crystal supercells and nanoparticles built from a unitcell, atoms element transmutation and multi-domain (e.g. core-shell, substrate-supported) systems combining several of the above builders together.

fullrmc.SystemBuilderUtils.generate_random_float()

random() -> x in the interval [0, 1).

fullrmc.SystemBuilderUtils.get_bounds(objName, bndName, varName, val, isInt=False, minv=None, maxv=None, canbeEqual=True)

Normalize a value into a validated (lower, upper) bounds tuple.

Parameters:
  1. objName (str): name of the calling object’s class, used to build descriptive assertion error messages

  2. bndName (str): name of the bounds family being validated (e.g. 'ellipsoid', 'supercell'), used in error messages

  3. varName (str): name of the specific variable being validated (e.g. 'a', 'b'), used in error messages

  4. val (number, list, tuple): the value to normalize. If a single number is given, it is used as both the lower and upper bound. If a list or tuple, it must contain exactly the (lower, upper) bound values

  5. isInt (boolean): whether the bounds must be integers rather than floats

  6. minv (None, number): if given, the lower bound must be >= minv

  7. maxv (None, number): if given, the lower bound must be <= maxv

  8. canbeEqual (boolean): whether the upper bound is allowed to be exactly equal to the lower bound

Returns:
  1. bounds (tuple): the validated (lower, upper) bounds tuple, cast to INT_TYPE if isInt is True or FLOAT_TYPE otherwise

fullrmc.SystemBuilderUtils.get_ellipsoid_dimension_bounds(obj, vn, val)

Normalize and validate a single ellipsoid semi-axis dimension bounds value, enforcing a minimum length of 1 angstrom.

Parameters:
  1. obj (object): the calling builder instance, used only to read its class name for descriptive assertion error messages

  2. vn (str): name of the ellipsoid dimension being validated (e.g. 'a', 'b' or 'c'), used in error messages

  3. val (number, list, tuple): the dimension bounds value. If a single number is given, it is used as both the lower and upper bound. If a list or tuple, it must contain exactly the (lower, upper) bound values

Returns:
  1. bounds (tuple): the validated (lower, upper) FLOAT_TYPE bounds tuple

fullrmc.SystemBuilderUtils.get_ellipsoid_params(obj, a, b, c)

Randomly draw the three semi-axes lengths of an ellipsoid within given bounds for each axis.

Parameters:
  1. obj (object): the calling builder instance, used only to read its class name for descriptive assertion error messages

  2. a (number, list, tuple): semi-axis ‘a’ bounds, in the same format accepted by get_bounds()

  3. b (number, list, tuple): semi-axis ‘b’ bounds, in the same format accepted by get_bounds()

  4. c (number, list, tuple): semi-axis ‘c’ bounds, in the same format accepted by get_bounds()

Returns:
  1. dimensions (tuple): a tuple of the three randomly drawn (a, b, c) semi-axes lengths

  2. bounds (tuple): a tuple of the three validated (aBounds, bBounds, cBounds) bounds tuples the dimensions were drawn from

fullrmc.SystemBuilderUtils.get_supercell_params(obj, a, b, c)

Randomly draw the three integer supercell repetitions along a, b and c within given bounds for each axis.

Parameters:
  1. obj (object): the calling builder instance, used only to read its class name for descriptive assertion error messages

  2. a (integer, list, tuple): supercell repetition along ‘a’ bounds, in the same format accepted by get_bounds()

  3. b (integer, list, tuple): supercell repetition along ‘b’ bounds, in the same format accepted by get_bounds()

  4. c (integer, list, tuple): supercell repetition along ‘c’ bounds, in the same format accepted by get_bounds()

Returns:
  1. supercell (tuple): a tuple of the three randomly drawn (a, b, c) integer repetitions

  2. bounds (tuple): a tuple of the three validated (aBounds, bBounds, cBounds) bounds tuples the repetitions were drawn from

fullrmc.SystemBuilderUtils.get_orientation_vector(obj, vector)

Validate and normalize a 3D vector into a unit orientation vector.

Parameters:
  1. obj (object): the calling builder instance, used only to read its class name for descriptive assertion error messages

  2. vector (list, tuple, numpy.ndarray): the 3 items non-zero vector to normalize

Returns:
  1. vector (numpy.ndarray): the normalized unit vector

class fullrmc.SystemBuilderUtils.BaseAmorphousBuilder(structs, boundaryConditions=50, bonds=None, stoichiometry=None, density=None, restrictions=None, name='unknown', _mappingUnit=0.5)

Bases: object

Base Builder for all builder implemenations. It must not be instanciated

Parameters:
  1. structs (pdbparser.pdbparser, list): list of primary structures (e.g. molecules) to use upon building the atomic configuration

  2. boundaryConditions (PeriodicBoundaries, numpy.ndarray, number): The configuration’s boundary conditions. If numpy.ndarray is given, it must be pass-able to a PeriodicBoundaries instance. Normally any real numpy.ndarray of shape (1,), (3,1), (9,1), (3,3) is allowed. If number is given, it’s like a numpy.ndarray of shape (1,), it is assumed as a cubic box of box length equal to number.

  3. bonds (None, dict): dictionary of defined atom pairs bonds that will be used upon building structure to prevent elements pair distance below bonds threshold

  4. stoichiometry (None, list): stoichriometry ratios between the different given primary structures. If None, then all structures stoichriometry will be the same

  5. density (number): configuration desired density in g/cm^3. e.g. for a pure water system at room temperature and under normal pressure conditions, density must be equal to 0.997. If None is given, the density will be automatically set to 0.997

  6. restrictions (None, string, list): list of geometric restrictions to be applied when creating the system. e.g. ‘(x**2 + y**2 + z**2)**0.5 <=10’ can be used to prevent any atom to be place in a sphere centered around 0 and of radius 10 angstrom

set_name(name)

Set the builder’s name, used to name the built pdb structure.

Parameters:
  1. name (string): the builder’s name

set_pdbs(pdbs, bonds=None)

Set building blocks primary structures

Parameters:
  1. pdbs (pdbparser.pdbparser, list): list of primary structures (e.g. molecules) to use upon building the atomic configuration

  2. bonds (None, dict): dictionary of defined atom pairs bonds that will be used upon building structure to prevent elements pair distance below bonds threshold

set_bonds_cutoff(bonds=None, _fudgeFactor=0.26)

Set bonds matrix

Parameters:
  1. bonds (None, dict): dictionary of defined atom pairs bonds that will be used upon building structure to prevent elements pair distance below bonds threshold

  2. _fudgeFactor (number): internal flag. Fraction of the sum of the two elements’ covalent radii used as the default bond cutoff distance for any element pair not explicitly given in bonds

set_stoichiometry(stoichiometry, inWeight=False)

Set the building blocks stoichiometry ratios

Parameters:
  1. stoichiometry (None, list): stoichriometry ratios between the different given primary structures. If None, then all structures stoichriometry will be the same

  2. inWeight (bool): whether to set stoichiometry in pdbs weight or in insertion number

set_boundary_conditions(boundaryConditions)

Set the final structure desired boundary conditions

Parameters:
  1. boundaryConditions (PeriodicBoundaries, numpy.ndarray, number): The configuration’s boundary conditions. If numpy.ndarray is given, it must be pass-able to a PeriodicBoundaries instance. Normally any real numpy.ndarray of shape (1,), (3,1), (9,1), (3,3) is allowed. If number is given, it’s like a numpy.ndarray of shape (1,), it is assumed as a cubic box of box length equal to number.

set_density(density)

Set the final structure density in g/cm^3

Parameters:
  1. density (number): configuration desired density in g/cm^3. e.g. for a pure water system at room temperature and under normal pressure conditions, density must be equal to 0.997. If None is given, the density will be automatically set to 0.997

set_insertion_number(insertionNumber)

Set the insertion parameter. This is another way to force the number of insertions per given primary structure. This will automatically reset the density of the system

Parameters:
  1. insertionNumber (list): list of integers

set_restrictions(restrictions=None)

Set the geometric restrictions

Parameters:
  1. restrictions (None, string, list): list of geometric restrictions to be applied when creating the system. e.g. ‘(x**2 + y**2 + z**2)**0.5 <=10’ can be used to prevent any atom to be place in a sphere centered around 0 and of radius 10 angstrom

set_prior_structure(pdb, name=None)

Set existing prior structure

Parameters:
  1. pdb (None, pdbparser.pdbparser): Set a prior structure that is considered present at time 0. If None, any previously set prior structure is cleared

  2. name (None, str): the prior structure’s name. If None, the given pdb’s own name is used instead

build(*args, **kwargs)

Build configuration

get_pdb()

Get a pdbparser instance of the built structure

Returns:
  1. pdb (pdbparser.pdbparser): the built structure

class fullrmc.SystemBuilderUtils.AmorphousSystem(structs, boundaryConditions=50, bonds=None, stoichiometry=None, density=None, restrictions=None, name='unknown', _mappingUnit=0.5)

Bases: BaseAmorphousBuilder

Create amorphous system using random translations and rotations

build(order=False, maxAttempts=1000, _reset=True, _logInc=10, _log=True, _debug=False, _interceptHook=None, *args, **kwargs)

Build the amorphous system

Parameters:
  1. order (bool, list): order of insertion. If True, insertion will start with the biggest pdb building block to the smallest. If False, shuffled order of insertion will be used. If list, it must be a list of building blocks indexes

  2. maxAttempts (integer): the maximum number of attempts to insert a specific pdb building block before moving to the next one.

  3. _reset (boolean): internal flag. If True, or if the builder was never built before, all build attributes are reset before starting a fresh insertion

  4. _logInc (integer): internal flag. Percent complete increment step at which a progress message is logged, between 0 and 100

  5. _log (boolean): internal flag. Whether to log progress and completion messages

  6. _debug (boolean): internal flag. If True, log a debug message whenever an accepted insertion violates the minimum bond distance with already inserted atoms

  7. _interceptHook (None, object): internal flag. Optional hook instance polled for a 'stop_builder' message between insertions, allowing the build to be interrupted gracefully

Returns:
  1. builtIntercepted (None, boolean): True if the build was interrupted early via _interceptHook, False if it ran to completion, or None if there was nothing left to insert

class fullrmc.SystemBuilderUtils.AmorphousNanoparticle(a=(20, 30), b=(20, 30), c=(20, 30), *args, **kwargs)

Bases: AmorphousSystem

Create an isolated amorphous nanoparticle shaped as an ellipsoid, by randomly inserting and orienting building blocks within an ellipsoid of semi-axes a, b and c rather than throughout the whole periodic simulation box.

Parameters:
  1. a (number, list, tuple): ellipsoid semi-axis ‘a’ length bounds in angstrom, must be >=1. If a single number is given, it is used as both the lower and upper bound. If a list or tuple, it must contain the (lower, upper) bound values, and the actual length is drawn randomly within them

  2. b (number, list, tuple): ellipsoid semi-axis ‘b’ length bounds, same format as a

  3. c (number, list, tuple): ellipsoid semi-axis ‘c’ length bounds, same format as a

  4. *args, **kwargs: other arguments and keyword arguments forwarded to BaseAmorphousBuilder. boundaryConditions must not be given, it is automatically computed from the ellipsoid dimensions

set_pdbs(*args, **kwargs)

Set building blocks primary structures. Same as BaseAmorphousBuilder.set_pdbs(), additionally resetting all building blocks ellipsoid penetration ratios to their default value of 1 via set_penetration().

Parameters:
  1. *args, **kwargs: arguments and keyword arguments forwarded to BaseAmorphousBuilder.set_pdbs()

Returns:
  1. result (None): always None, forwarded from BaseAmorphousBuilder.set_pdbs() which doesn’t return a value

set_penetration(penetration)

Set how deeply each building block is allowed to penetrate through the ellipsoid surface upon insertion.

Parameters:
  1. penetration (None, list): list of penetration ratios, one per building block pdb, in the same order as given to set_pdbs(). Each ratio must be >0 and <=1, where 1 means the building block must be fully contained inside the ellipsoid and smaller values allow it to stick out further past the ellipsoid surface. If None, all building blocks are set to a penetration ratio of 1

build(*args, **kwargs)

Build the amorphous nanoparticle. Same as AmorphousSystem.build(), additionally clearing the built pdb’s boundary conditions (the nanoparticle is isolated, not periodic) and recomputing its number density and density from the ellipsoid volume rather than the periodic box volume.

Parameters:
  1. *args, **kwargs: arguments and keyword arguments forwarded to AmorphousSystem.build()

Returns:
  1. builtIntercepted (None, boolean): same as AmorphousSystem.build()’s return value

set_boundary_conditions(*args, **kwargs)

Automatically compute and set the periodic boundary conditions big enough to contain the ellipsoid plus a padding margin large enough to fit the biggest building block, and set the ellipsoid’s volume accordingly. Unlike BaseAmorphousBuilder.set_boundary_conditions(), this method takes no boundary conditions argument since it is entirely derived from the ellipsoid semi-axes lengths a, b and c

class fullrmc.SystemBuilderUtils.BaseCrystalBuilder(structs, supercell=None, name='unknown', *args, **kwargs)

Bases: object

Base builder for all crystal-based builder implementations built from one or more unitcells. It must not be instanciated directly.

Parameters:
  1. structs (CrystalMaker, dict, str, list): the primary crystal unitcell structure(s) to build from. Each item can be a pdbparser.Utilities.Crystallography.CrystalMaker instance, a dictionary of keyword arguments used to instanciate one, or a string cif file path

  2. supercell (None, int, list, tuple): unused by this base class, kept for subclasses convenience

  3. name (string): the builder’s name

  4. *args, **kwargs: unused, accepted for subclasses convenience

set_name(name)

Set the builder’s name, used to name the built pdb structure.

Parameters:
  1. name (string): the builder’s name

set_cifs(cifs)

Set building blocks primary structures

Parameters:
  1. cifs (pdbparser.Utilities.Crystallography.CrystalMaker, list): list of primary structures (e.g. unitcells) to use upon building the atomic configuration

class fullrmc.SystemBuilderUtils.CrystalSupercell(structs, supercell=(10, 10, 10), *args, **kwargs)

Bases: BaseCrystalBuilder

Build a periodic crystal supercell structure by repeating a single unitcell along its a, b and c basis vectors.

Parameters:
  1. structs (CrystalMaker, dict, str): a single primary crystal unitcell structure, in any format accepted by BaseCrystalBuilder.set_cifs()

  2. supercell (int, list, tuple): number of unitcell repetitions bounds along a, b and c. If a single number is given, it is used as both the lower and upper bound for all three directions. If a list or tuple of 3 items, each item is either a number or a (lower, upper) bounds pair for the corresponding direction, and the actual repetition count is drawn randomly within them

  3. *args, **kwargs: other arguments and keyword arguments forwarded to BaseCrystalBuilder

property boundaryConditions

The built structure’s boundary conditions, or None if the structure hasn’t been built yet.

set_supercell(supercell)

Set the supercell repetitions along a, b and c, drawing the actual repetition counts randomly within given bounds. Setting this after a structure was already built clears the built structure if the drawn supercell changes.

Parameters:
  1. supercell (int, list, tuple): number of unitcell repetitions bounds along a, b and c, in the same format accepted by this class’s constructor

build(supercell=None, _debug=False, _log=True, _interceptHook=None, *args, **kwargs)

Build the crystal supercell structure.

Parameters:
  1. supercell (None, int, list, tuple): if given, forwarded to set_supercell() to redraw the supercell repetitions before building. If None, the previously set supercell is used

  2. _debug (boolean): internal flag, currently unused, kept for interface consistency with other builders

  3. _log (boolean): internal flag. Whether to log start and completion messages

  4. _interceptHook (None, object): internal flag, cleared before building. Kept for interface consistency with other builders; supercell creation itself cannot be interrupted mid-way

Returns:
  1. builtIntercepted (boolean): always False, kept for interface consistency with other builders’ build()

get_pdb()

Get a pdbparser instance of the built structure

Returns:
  1. pdb (pdbparser.pdbparser): the built structure

class fullrmc.SystemBuilderUtils.CrystalNanoparticle(a=(20, 30), b=(20, 30), c=(20, 30), orientation=None, *args, **kwargs)

Bases: BaseCrystalBuilder

Build an isolated crystal nanoparticle shaped as an ellipsoid, by generating a large enough crystal supercell from a single unitcell, orienting it and keeping only the atoms (or unitcells) falling inside the ellipsoid of semi-axes a, b and c.

Parameters:
  1. a (number, list, tuple): ellipsoid semi-axis ‘a’ length bounds in angstrom, must be >=1. If a single number is given, it is used as both the lower and upper bound. If a list or tuple, it must contain the (lower, upper) bound values, and the actual length is drawn randomly within them

  2. b (number, list, tuple): ellipsoid semi-axis ‘b’ length bounds, same format as a

  3. c (number, list, tuple): ellipsoid semi-axis ‘c’ length bounds, same format as a

  4. orientation (None, list): forwarded to set_orientation()

  5. *args, **kwargs: other arguments and keyword arguments forwarded to BaseCrystalBuilder

set_orientation(orientation)

Set the nanoparticle’s crystallographic orientation, used to rotate the supercell before cutting out the ellipsoid so that a chosen crystal direction aligns with the x-axis, and rotate the final ellipsoid-cut nanoparticle back to its original orientation.

Parameters:
  1. orientation (None, list, tuple, numpy.ndarray): the 3 items non-zero orientation vector. If None, defaults to (1,0,0) i.e. no rotation

build(strategy='atomic', _debug=False, _log=True, _interceptHook=None, *args, **kwargs)

Build the crystal nanoparticle.

Parameters:
  1. strategy (str): how atoms falling outside the ellipsoid are handled once the oversized supercell is generated. 'atomic' keeps only the individual atoms found inside the ellipsoid regardless of their unitcell. 'keep unitcell' keeps every atom belonging to a unitcell that has at least one atom inside the ellipsoid. 'remove unitcell' removes every atom belonging to a unitcell that has at least one atom outside the ellipsoid

  2. _debug (boolean): internal flag, currently unused, kept for interface consistency with other builders

  3. _log (boolean): internal flag. Whether to log start and completion messages

  4. _interceptHook (None, object): internal flag, cleared before building. Kept for interface consistency with other builders; the ellipsoid cut itself cannot be interrupted mid-way

Returns:
  1. builtIntercepted (boolean): always False, kept for interface consistency with other builders’ build()

get_pdb()

Get a pdbparser instance of the built structure

Returns:
  1. pdb (pdbparser.pdbparser): the built structure

class fullrmc.SystemBuilderUtils.AtomsTransmutator(structs, name='unknown', *args, **kwargs)

Bases: object

Build a new structure from an existing one by randomly transmuting a fraction of its atoms from one element (or atom name) to another, e.g. to simulate isotopic substitution or doping.

Parameters:
  1. structs (CrystalMaker, pdbparser.pdbparser): the existing structure to transmute atoms from. If a CrystalMaker instance is given, it is first converted to a pdbparser instance (generating a (1,1,1) supercell if needed)

  2. name (string): the builder’s name

  3. *args, **kwargs: unused, accepted for interface consistency with the other builders

property boundaryConditions

The original (pre-transmutation) structure’s boundary conditions.

set_name(name)

Set the builder’s name, used to name the built pdb structure.

Parameters:
  1. name (string): the builder’s name

build(transmutations, _log=True, _interceptHook=None, *args, **kwargs)

Build the transmuted structure by copying the original structure and randomly transmuting a fraction of its atoms according to the given transmutation rules.

Parameters:
  1. transmutations (dict): the transmutation rules. It can either be a flat dict mapping an element symbol to a (newElement, newAtomName, ratio) tuple (shorthand for {'elements': ...}), or a dict with up to two keys: 'elements' mapping an element symbol to a (newElement, newAtomName, ratio) tuple applied to every atom of that element, and 'names' mapping a specific atom name to a (newElement, newAtomName, ratio) tuple applied only to atoms with that exact name (checked before and taking precedence over the 'elements' rule). ratio must be between 0 and 1 and is the per-atom probability of actually transmuting that atom

  2. _log (boolean): internal flag. Whether to log start and completion messages

  3. _interceptHook (None, object): internal flag, cleared before building. Kept for interface consistency with other builders; the transmutation loop itself cannot be interrupted mid-way

Returns:
  1. builtIntercepted (boolean): always False, kept for interface consistency with other builders’ build()

get_pdb()

Get a pdbparser instance of the built structure

Returns:
  1. pdb (pdbparser.pdbparser): the built structure

class fullrmc.SystemBuilderUtils.NanoDomains(domains, boundaryConditions=None, bonds=None, name='unknown', _mappingUnit=0.5)

Bases: object

Build a multi-domain system by inserting several independently built domains (e.g. isolated nanoparticles, amorphous chunks, transmuted structures) next to and possibly intersecting each other, optionally around a fixed substrate domain. This allows building complex systems such as core-shell nanoparticles, substrate-supported nanoparticles or heterogeneous multi-phase assemblies, using any combination of the other builders in this module as sub-builders for each domain.

Parameters:
  1. domains (list): list of domain definition dictionaries. Each dictionary can have the following keys:

    • 'name' (str): the domain’s name, defaults to 'domain %i'%idx. Automatically de-duplicated if reused

    • 'structure' (str, list, pdbparser.pdbparser, CrystalMaker): the domain’s structure, either given directly as a pdb or cif file path, a list of pdb file lines, a pdbparser instance or a CrystalMaker instance, or used as the structs argument of 'builder' when one is given

    • 'domain_molecules_name' (None, str): optional molecules name override, maximum 3 characters

    • 'single_atoms' (bool): whether the domain is inserted atom by atom rather than as a whole rigid block. Defaults to False

    • 'intersection_likelihood' (number): probability >=0 that this domain is allowed to intersect with previously inserted domains rather than being rejected. Defaults to 0

    • 'number_of_insertions' (int): number of times this domain is inserted. Defaults to 1

    • 'fresh_build_per_insertion' (bool): whether the domain’s sub-builder is rebuilt from scratch (new random conformation) at every insertion, or built once and reused. Defaults to True

    • 'insert_all_or_none' (bool): whether the whole domain insertion must be rejected if any of its atoms can’t be placed. Defaults to False

    • 'allow_replacement' (bool): whether later domains are allowed to intersect and replace this domain’s atoms. Defaults to True

    • 'randomly_rotate' (bool): whether to randomly rotate the domain upon insertion. Defaults to True

    • 'randomly_translate' (bool): whether to randomly translate the domain upon insertion. Defaults to True

    • 'fixed_position' (None, ‘center’, list): force the domain’s position instead of randomly translating it

    • 'fixed_orientation' (None, list): force the domain’s orientation instead of randomly rotating it

    • 'builder' (None, str, class): optional sub-builder class (or its name) among CrystalNanoparticle, AmorphousNanoparticle, AmorphousSystem, CrystalSupercell and AtomsTransmutator, used to generate the domain’s structure from 'structure'

    • 'builder_kwargs' (dict): keyword arguments forwarded to the sub-builder’s constructor when 'builder' is given

    • 'build_kwargs' (dict): keyword arguments forwarded to the sub-builder’s build() method when 'builder' is given

    • 'substrate' (bool): marks this domain as the fixed substrate. At most one domain may be a substrate. When set, 'number_of_insertions' is forced to 1 and 'randomly_translate', 'randomly_rotate', 'fixed_position' and 'fixed_orientation' are forced to their neutral values, since the substrate defines the system’s boundary conditions itself

  2. boundaryConditions (None, PeriodicBoundaries, numpy.ndarray, number): the configuration’s boundary conditions, in the same format accepted by BaseAmorphousBuilder.set_boundary_conditions(). Must not be given when one of the domains is a substrate, since the substrate’s own boundary conditions are used instead

  3. bonds (None, dict): dictionary of defined atom pairs bonds that will be used upon building structure to prevent elements pair distance below bonds threshold

  4. name (string): the builder’s name

  5. _mappingUnit (number): internal flag. Approximate real-space size in angstrom of one cell of the internal insertion map grid used to speed up overlap detection

set_name(name)

Set the builder’s name, used to name the built pdb structure.

Parameters:
  1. name (string): the builder’s name

set_boundary_conditions(boundaryConditions, _check=True)

Set the final structure desired boundary conditions

Parameters:
  1. boundaryConditions (PeriodicBoundaries, numpy.ndarray, number): The configuration’s boundary conditions. If numpy.ndarray is given, it must be pass-able to a PeriodicBoundaries instance. Normally any real numpy.ndarray of shape (1,), (3,1), (9,1), (3,3) is allowed. If number is given, it’s like a numpy.ndarray of shape (1,), it is assumed as a cubic box of box length equal to number.

  2. _check (boolean): internal flag, currently unused (checks are commented out), kept for interface consistency

set_bonds_cutoff(bonds=None, _fudgeFactor=None)

Set bonds matrix

Parameters:
  1. bonds (None, number, dict): dictionary of defined atom pairs bonds that will be used upon building structure to prevent elements pair distance below bonds threshold. If a number is given, it is used as the bond cutoff distance for every element pair

  2. _fudgeFactor (None, number): internal flag. If given, updates the fraction of the sum of the two elements’ covalent radii used as the default bond cutoff distance for any element pair not explicitly given in bonds

build(order=True, failAll=False, _maxNumberOfIntersections=64, _flexibleLimit=256, _debug=False, _log=True, _interceptHook=None, *args, **kwargs)

Build domains system.

Parameters:
  1. order (bool, list): order of insertion. If True, insertion will start with the biggest pdb building block to the smallest. If False, shuffled order of insertion will be used. If list, it must be a list of building blocks indexes

  2. failAll (bool): whether to fail the build if any of the given domains failed to be built. Failing to build the substrate will always result in failing the whole build

  3. _maxNumberOfIntersections (integer): internal flag. Initial size of the per-atom buffer used to track how many already-built atoms a newly inserted domain’s atoms intersect with. Automatically grown by increments of 8 up to _flexibleLimit if this initial size is exceeded

  4. _flexibleLimit (integer): internal flag. Hard upper limit on the automatic growth of the intersections buffer described above. If reached without finding a valid (non-overflowing) intersection count, the domain’s atoms are all rejected

  5. _debug (boolean): internal flag, currently unused, kept for interface consistency with other builders

  6. _log (boolean): internal flag. Whether to log progress and completion messages

  7. _interceptHook (None, object): internal flag. Optional hook instance polled for a 'stop_builder' message between domain insertions, allowing the build to be interrupted gracefully

Returns:
  1. builtIntercepted (boolean): True if the build was interrupted early via _interceptHook, False if it ran to completion

get_pdb()

Get a pdbparser instance of the built structure

Returns:
  1. pdb (pdbparser.pdbparser): the built structure

Previous topic

fullrmc.OptimizationEngine module

Next topic

fullrmc.Selectors package