Engine
set_molecules_indexes method is used explicitly,
molecules are classified by parsing the structure
‘.pdb’ file
Residue name, Residue sequence number and Segment identifier
attributes. Therefore a molecule is the collection of all atoms sharing
the same three later attributes value.The first method is by using pip. If you don’t know what pip is and you are lazy enough not to read through the documentation, pip supports installing from PyPI, version control, local projects, and directly from distribution files. To install pip download get_pip.py file and run the following from the command line.
python get_pip.py
The second method is by fullrmc’s cloning the source code and repository from github and then compiling the extension files in place.
Installation using pip:
Installing fullrmc with pip is done in two steps. Firstly install numpy and cython manually and ensure that they meet with fullrmc’s version requirement.
pip install -U "numpy>=1.17.4" pip install -U "cython>=0.29.14"
When you already have a working up-do-date installation of numpy and cython, you can proceed to installing fullrmc. The rest of the dependencies will be automatically installed and updated while fullrmc is being installed.
pip install fullrmc
Installation by cloning github repository:
- Ensure all fullrmc required packages are installed and up-do-date by executing the following python script:
# check whether all packages are already installed from __future__ import print_function from pkg_resources import parse_version as PV for name, ver in [('numpy' ,'1.17.4') , ('cython' ,'0.29.14'), ('pyrep' ,'3.1.0') , ('pdbparser' ,'0.1.7') , ('pysimplelog','2.0.0') , ('matplotlib' ,'2.2.3' )]: try: lib = __import__(name) except: print('%s must be installed for fullrmc to run properly.'%(name)) else: if PV(lib.__version__) < PV(ver): print('%s installed version %s is below minimum suggested version %s. Updating %s is highly) recommended.'%(name, lib.__version__, ver, name) else: print('%s is installed properly and minimum version requirement is met.'%(name))
Locate python’s site-packages by executing the following python script:
from __future__ import print_function import os os.path.join(os.path.dirname(os.__file__), 'site_packages')Navigate to site_packages folder and clone git repository from command line:
cd .../site_packages git clone https://github.com/bachiraoun/fullrmc.git
- Change directory to …/site_packages/fullrmc/Extensions. Then compile fullrmc extensions from command line as the following:
cd .../site_packages/fullrmc/Extensions python setup.py build_ext --inplace
Latest stable version source code: https://github.com/bachiraoun/fullrmc
Latest pypi installable version: https://pypi.python.org/pypi/fullrmc/
This version is not published.
- Selectors:
RandomSelector
WeightedRandomSelector
DefinedOrderSelector
DirectionalOrderSelector
- Constraints:
InterMolecularDistanceConstraint
IntraMolecularDistanceConstraint
BondConstraint
BondsAngleConstraint
ImproperAngleConstraint
PairDistributionConstraint
PairCorrelationConstraint
- Generators:
TranslationGenerator
TranslationAlongAxisGenerator
TranslationAlongSymmetryAxisGenerator
TranslationTowardsCenterGenerator
TranslationTowardsAxisGenerator
TranslationTowardsSymmetryAxisGenerator
TranslationAlongSymmetryAxisPath
RotationGenerator
RotationAboutAxisGenerator
RotationAboutSymmetryAxisGenerator
RotationAboutSymmetryAxisPath
DistanceAgitationGenerator
AngleAgitationGenerator
This is the first officially published version.
- Selectors:
SmartRandomSelector
- Constraints:
AtomicCoordinationNumberConstraint
- Generators:
SwapPositionsGenerator
- Boundary conditions handling for all non cubic, tetragonal nor orthorhombic systems is prone to distances calculation errors caused by pdbparser (<=0.1.2).
Starting from this version, pdbparser (>=0.1.3) is used.
- Periodic boundary conditions handling fixed and separated from pdbparser.
InterMolecularDistanceConstraint
squared deviation computation changed from square law to absolute value. Therefore small values are not under-represented in the total squared deviation calculation.InterMolecularDistanceConstraint
‘flexible’ flag added.
- Erroneous wx imports from thfSimulation Example is removed.
PairDistributionConstraint
andPairCorrelationConstraint
check_experimental_data merged and sorted distances bug fixed.PairDistributionConstraint
andPairCorrelationConstraint
set_limits bug fixed.Engine
add_group method allows list, set, tuples as well as integers.
PairDistributionConstraint
andPairCorrelationConstraint
binning precision fixed. Histogram compiled C code adjusted accordingly.AtomicCoordinationNumberConstraint
set_coordination_number_definition method error message made more clear.AtomicCoordinationNumberConstraint
compiled C++ code boundary conditions distances computation fixed for multiple box separation.
StructureFactorConstraint
added computing Static Structure FactorReducedStructureFactorConstraint
added computing Reduced Static Structure Factor
PairDistributionConstraint
andPairCorrelationConstraint
plot Y axis label units added.- swap example changed to atomicSimulation and S(q) added to the fitting along with G(r)
- thfSimulation example change to molecularSimulation
This is a main version change from 0.x.y to 1.x.y and that’s because non-periodic boundary conditions are now implemented. Starting from this version shape function correction can be used. For non-periodic boundary conditions, very big box with periodic boundaries is automatically set and system shape function is estimated to correct for the fixed \(\rho_{0}\) global density approximation.
Some testing were done prior to publishing this version and it was found out that
computing angles for BondsAngleConstraint
can in some cases be wrong.
We recommend updating to this version if BondsAngleConstraint
is needed
for fitting molecular systems.
Starting from this version, pdbparser (>=0.1.4) is used.
- fullrmc.Constraints.Collection package added along with
ShapeFunction
- Engine numberDensity added. Used to set correct volume and density when InfiniteBoundaries are used
- fullrmc.Core.Collection.smooth function added. It can be used to smooth out any 1D data. This is useful for noise experimental data
- BondAngles calculation bug fixed
- Constraints all squared deviations attributes and methods changed to standard error to conserve the generality
- Engine chiSquare attributes and methods changed to total standard error to conserve the generality
- Logger levels added
- rebin core method check argument added
StructureFactorConstraint
andReducedStructureFactorConstraint
experimentalQValues set as property
Starting from this version, pdbparser (>=0.1.5) is used. There is no bugs fixed in this version comparably to version 1.0.0. This version corrects for cell visualization compatibility between fullrmc and VMD. VMD cell plugin uses a, b, c, unitcell parameters (the lengths of vectors A, B and C the 3D-vectors of the unitcell sides with the convention that A is parallel to the x-axis) and alpha, beta, gamma (the angles of the unit cell) for non-orthorhombic unitcells. This version uses cell plugin no more but draw the boundary conditions vectors directly. Also visualization method ‘boxToCenter’ flag is added to correct for box visualization shifts by translating boundary conditions vectors’ centre to atom coordinates one.
Several levels of abstractions are made allowing multiple core computations
using openmp. Nevertheless more testing is needed and therefore the current
version is published as single core still.
AtomicCoordinationNumberConstraint
uses python objects which
makes it very slow, it must be revisited.
Constraint
computation cost property added. This is used at engine runtime to minimize computations and enhance performance by computing less costly constraints first.
BondsAngleConstraint
computing angle right vector normalization bug fixed.ImproperAngleConstraint
computing improper vector bug fixed.
Starting from this version, running fullrmc on multicore and multiprocessor computers is possible. Also, pysimplelog (>=0.2.1) is used. Isolated system in non-periodic boundary conditions are treated correctly as in an infinte box using inifinite boundary conditions instead of a very big box with periodic boundaries.
AtomicCoordinationNumberConstraint
completely reimplemented and optimized. Coordination number definition is re-formatted allowing any type of core’s and shell’s atoms. This new implementation computes mean coordination number per shell definition rather than per atom. Fractional coordination numbers are allowed and this implementation benefits from a tremendous performance increase of 1000 times compared to the old one.- Engine.run method ‘restartPdb’ and ‘ncore’ arguments added.
No bugs fixed but some examples corrected.
This is a main version change from 1.x.y to 2.x.y. Starting from this version engine is no more a single file but a pyrep repository. Using a repository engine instead of a single file has many advantages. The first and more important advantage is the limitation of accessing and saving single big engine files when the simulated atomic system is big. The second advantage is the introduction of the concept of engine frames. Frames can be used to build a fitting history or even better to creating a statistical structural solution rather than a single structure one which is prone primarily to overfitting and other errors. Also, repository engine’s insure a sort of backwards compatibility and files can be retrieved when updating fullrmc’s versions. Implementation wise, switching from single file to repository is the ground layer to taking fullrmc to the next level of super-computing. Engine repository is not a binary black box file but a directory or a folder that one can browse. It’s advisable not to manually delete or add files or folders to the repository. Interacting with fullrmc.Engine instance is what one should do to creating or updating engine’s repository. The transition to fullrmc 2.x.y. should be done seemlessly at the end of the user except for small modifications that were made and that are listed below.
Engine
: Several modification happened to fullrmc.Engine class definition.
- Instanciating engine arguments have changed. We found that it’s a bad practice to set the pdb structure, the constraints, the groups and all other attributes at the engine instanciation. Therefore, now engine’s instanciation takes more appropriate arguments such as the engine’s repository path, the frames, the log file path and whether to delete a found engine at the given path and start fresh using freshStart flag.
- Engine.is_engine method is added to check whether a given path is a fullrmc.Engine repository.
- Engine frames related methods are also added to manipulate and switch between frames.
- Engine.run method takes no more savePath argument, as the path has to be the repository. In case one wants to save in a new repository, he should save the engine first using Engine.save method and then run the engine using Engine.run method.
Constraint
: We also found that constraints must not be allowed to change engine and therefore Constraint.set_engine method is now deprecated. Also Constraints are now instanciated without engine argument. Constraint’s engine is set automatically when a constraint is added to an engine.
- abs function changed in all compiled files as it was creating rounding issues on some operating systems.
- arcos function cliped for floating errors in angles compiled file.
InterMolecularDistanceConstraint
: Computing constraint data in function single_atomic_distances_dists of compiled atomic_distances fixed.BondConstraint
: bondsMap fixed from causing definition conflicts if set multiple times.BondsAngleConstraint
: anglesMap fixed from causing definition conflicts if set multiple times.ImproperAngleConstraint
: anglesMap fixed from causing definition conflicts if set multiple times.
This is a main version change from 2.x.y to 3.x.y where pyrep (>=1.0.3) is used. Thusfar until versions 2.x.y, system’s number of atoms is fixed throughout the whole simulation. Starting from this version, fullrmc allows dynamically removing atoms from the system upon fitting. This is a revolutionary functionality enabling the reproduction of defects in systems.
DihedralAngleConstraint
implemented to control dihedral angles.AtomsCollector
implemented allowing the ability of dynamically remove and add re-insert atoms to the system.AtomsRemoveGenerator
implemented to generate atoms removing from system upon fitting.EmptyGroup
added to host Removes generators.
- all cython modules are completely de-pythonized.
- all angle constraints respect the same implementation and interface design.
- Plot method added to all of
BondConstraint
,BondsAngleConstraint
,DihedralAngleConstraint
andImproperAngleConstraint
.
DihedralAngleConstraint
FRAME_DATA fixed which was preventing constraint from saving to pyrep repository.
- Redundant objects global container mechanism added. This will sometimes reduce some engine’s attributes size, allowing fast saving and loading of data.
MoveGeneratorCombinator
bug from latest update fixed.SwapGenerator
is not allowed to be collected or combined with other generators. Also swapList will update automatically upon removing and releasing atoms.RemoveGenerator
is not allowed to be collected or combined with other generators.- MLSelection, refine and explore examples BiasedEngine fixed
Starting from this version, it is possible to custom set atoms weight for all
of PairDistributionConstraint
, PairCorrelationConstraint
,
StructureFactorConstraint
and ReducedStructureFactorConstraint
.
Also starting from this version, pysimplelog (>=0.3.0) and pyrep (>=1.0.4) are used.
- All constraints export data method added.
- All constraints plot method added.
IntraMolecularDistanceConstraint
added again after being removed in early versions.
Engine
repository ACID flag is changed to False as it’s not needed.StructureFactorConstraint
andReducedStructureFactorConstraint
atoms removal bug fixed.- Computing standard error for
IntraMolecularDistanceConstraint
andInterMolecularDistanceConstraint
is optimized for big systems and constraint’s definition. Calculation time is thousands of times faster for extended definitions.
Some bugs are fixed and documentation is revisited.
Engine
set_number_density method PeriodicBoundaries bug fixed.StructureFactorConstraint
set_weighting xrays and neutron recognized.
Raised issue bug fixed
Some bugs are fixed and documentation is revisited.
Raised issue bug fixed
Raised issue bug fixed
This version is not published.
Starting from this version, fullrmc has become grid computing capable. multiframe is implemented to generate a statistical solution of multiple frames instead of a single frame solution. Along with this version, an instance of fullrmc will be available on a cloud service that can be used to launch fullrmc and perform multiframe computations. We will update all user in the Q&A group when and where this service will be available
- MultiframeUtils module added which will be used to launch fullrmc on computation grids
- ExperimentalConstraints plot and data export methods factored
StructureFactorConstraint
scale factor bug fixedPairCorrelationConstraint
scale factor bug fixed- Engine run method explore bug fixed
- Amputation number density bug fixed for InfiniteBoundaryConditions
Starting from this version, fullrmc stochastic Engine is codify-able. This is a new capability that allows exporting the engine across all systems and operating system without worrying about serialization compatibility. Also, starting from this version, fullrmc requires pylocker to be installed.
- Group ‘name’ property added
- Engine ‘codify’ method added
- constraints number of tried and accepted moves are tracked now
- constraints advanced plotting and export helper method
- Engine remove constraint bug fixed
OrientationGenerator
bugs fixedDirectionalOrderSelector
bug fixedBondConstraint
add_bond method deprecated. set_bonds method modified for performance reasons. bondsDefinition property added.BondsAngleConstraint
add_bond method deprecated. set_bonds method modified for performance reasons. anglesDefinition property added.DihedralAngleConstraint
add_bond method deprecated. set_bonds method modified for performance reasons. anglesDefinition property added.ImproperAngleConstraint
add_bond method deprecated. set_bonds method modified for performance reasons. anglesDefinition property added.PairDistributionConstraint
set_atoms_weight dump to repository bug fixed