pyVLMP 1.0.71__tar.gz → 1.0.76__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyvlmp-1.0.71/pyVLMP.egg-info → pyvlmp-1.0.76}/PKG-INFO +5 -2
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/AFM.py +23 -1
- pyvlmp-1.0.76/VLMP/components/models/AdaptiveCG.py +144 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/HELIX.py +41 -137
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/SBCG.py +4 -2
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/patchPolymersMeasurement.py +0 -5
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/experiments/HighThroughputAFM.py +23 -2
- {pyvlmp-1.0.71 → pyvlmp-1.0.76/pyVLMP.egg-info}/PKG-INFO +5 -2
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/pyVLMP.egg-info/SOURCES.txt +1 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/pyVLMP.egg-info/requires.txt +1 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/pyproject.toml +2 -2
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/LICENSE +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/MANIFEST.in +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/README.md +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/VLMP.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/__main__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/ensembles/NVT.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/ensembles/NVTlambda.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/ensembles/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/integrators/BBK.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/integrators/EulerMaruyama.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/integrators/EulerMaruyamaRigidBody.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/integrators/EulerMaruyamaRigidBodyPatchesState.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/integrators/GJF.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/integrators/MagneticBrownian.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/integrators/NVE.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/integrators/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/ACMagneticField.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/LennardJones.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/WCA.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/absortionSurface.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/addBond.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constantForce.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constantForceBetweenCentersOfMass.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constantForceOverCenterOfMass.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constantTorqueBetweenCentersOfMass.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constantTorqueOverCenterOfMass.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constraintCenterOfMassPosition.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constraintParticlesListPositionLambda.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constraintParticlesPosition.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constraintParticlesPositionLambda.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/harmonicBondBetweenCentersOfMass.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/helixBoundaries.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/plates.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/sphericalShell.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/steric.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/surface.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/surfaceMaxForce.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/uniformField.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelOperations/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelOperations/alignInertiaMomentAlongVector.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelOperations/distributeRandomly.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelOperations/rotation.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelOperations/setCenterOfMassPosition.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelOperations/setContactDistance.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelOperations/setParticleLowestPosition.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelOperations/setParticlePositions.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelOperations/setParticleXYPosition.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/CORONAVIRUS.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/ENM.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/FILE.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/ICOSPHERE.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/IDP.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/KB.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/MADna.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/MAGNETICNP.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/MEMBRANE.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/PARTICLE.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/PROTEIN_IDP_PROTEIN.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/SIMULATION.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/SOP.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/SPHEREMULTIBLOB.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/STERIC_LAMBDA_SOLVATION.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/WLC.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/data/CORONAVIRUS.json +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/data/ICOSPHERE.json +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/models/data/MADna.json +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/AFMMaxForce.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/afmMeasurement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/anglesMeasurement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/centerOfMassMeasurement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/forceBetweenSetsMeasurement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/gyrationRadius.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/heightMeasurement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/info.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/lambdaActivation.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/lambdaCycle.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/meanMagnetizationMeasurement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/meanRadius.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/meanSquareDisplacement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/nativeContactsMeasurement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/oscillatoryForceMeasurment.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/pairwiseForces.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/potentialEnergyMeasurement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/potentialMeasurement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/savePatchyParticlesState.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/saveState.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/stressMeasurement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/thermodynamicIntegration.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/thermodynamicMeasurement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/vqcmMeasurement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/vqcmMobilityMeasurement.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/systems/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/systems/backup.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/systems/seed.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/systems/simulationName.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/types/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/types/basic.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/types/none.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/units/KcalMol_A.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/units/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/units/none.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/experiments/SurfaceUmbrellaSampling.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/experiments/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/utils/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/utils/geometry/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/utils/geometry/bounds.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/utils/geometry/objects/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/utils/geometry/objects/helix.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/utils/geometry/particlesDistribution.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/utils/input/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/utils/input/stringUtils.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/utils/launcher/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/utils/selections/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/utils/selections/commonSelections.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/utils/units/__init__.py +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/pyVLMP.egg-info/dependency_links.txt +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/pyVLMP.egg-info/top_level.txt +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/setup.cfg +0 -0
- {pyvlmp-1.0.71 → pyvlmp-1.0.76}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pyVLMP
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.76
|
|
4
4
|
Summary: Virtual Lab Modeling Platform
|
|
5
5
|
Home-page: https://github.com/PabloIbannez/pyGrained
|
|
6
6
|
Author-email: Pablo Ibáñez-Freire <p.ibanez.fre@gmail.com>
|
|
@@ -20,6 +20,9 @@ Requires-Dist: tqdm
|
|
|
20
20
|
Requires-Dist: pyGrained
|
|
21
21
|
Requires-Dist: JFIO
|
|
22
22
|
Requires-Dist: pyUAMMD
|
|
23
|
+
Requires-Dist: colorama
|
|
24
|
+
Dynamic: home-page
|
|
25
|
+
Dynamic: license-file
|
|
23
26
|
|
|
24
27
|
# VLMP (Virtual Lab Modeling Platform)
|
|
25
28
|
|
|
@@ -8,10 +8,12 @@ class AFM(modelExtensionBase):
|
|
|
8
8
|
This extension add an interaction between a particle (the tip) and other set of
|
|
9
9
|
particles (the sample). The interaction between the tip and the sample is modeled
|
|
10
10
|
as a Lennard-Jones potential. The tip is modeled as a spherical particle with a
|
|
11
|
-
spring attached to it.",
|
|
11
|
+
spring attached to it. Optionally, the tip is a cone that ends in that sphere.",
|
|
12
12
|
"parameters": {
|
|
13
13
|
"K": {"description": "Spring constant for the AFM cantilever", "type": "float", "default": null},
|
|
14
14
|
"Kxy": {"description": "Lateral spring constant", "type": "float", "default": null},
|
|
15
|
+
"tipShape": {"description": "Shape of the tip, spherical or sphericallyBluntedConic", "type": "str", "default": "spherical"},
|
|
16
|
+
"tipAngle": {"description": "Half-angle of the cone in radians, only for sphericallyBluntedConic", "type": "float", "default": null},
|
|
15
17
|
"epsilon": {"description": "Energy parameter for tip-sample interaction", "type": "float", "default": null},
|
|
16
18
|
"sigma": {"description": "Distance parameter for tip-sample interaction", "type": "float", "default": null},
|
|
17
19
|
"tipVelocity": {"description": "Velocity of the AFM tip", "type": "float", "default": null},
|
|
@@ -42,6 +44,7 @@ class AFM(modelExtensionBase):
|
|
|
42
44
|
availableParameters = {"epsilon",
|
|
43
45
|
"sigma",
|
|
44
46
|
"K","Kxy",
|
|
47
|
+
"tipShape","tipAngle",
|
|
45
48
|
"tipVelocity",
|
|
46
49
|
"indentationStartStep",
|
|
47
50
|
"indentationBackwardStep"}
|
|
@@ -67,6 +70,18 @@ class AFM(modelExtensionBase):
|
|
|
67
70
|
K = params["K"]
|
|
68
71
|
Kxy = params["Kxy"]
|
|
69
72
|
|
|
73
|
+
tipShape = params.get("tipShape","spherical")
|
|
74
|
+
tipAngle = params.get("tipAngle",None)
|
|
75
|
+
|
|
76
|
+
if tipShape not in ["spherical","sphericallyBluntedConic"]:
|
|
77
|
+
self.logger.error(f"AFM model extension, tip shape {tipShape} not available, "
|
|
78
|
+
"available shapes are: spherical, sphericallyBluntedConic")
|
|
79
|
+
raise Exception("Tip shape not available")
|
|
80
|
+
|
|
81
|
+
if (tipShape == "sphericallyBluntedConic") != (tipAngle is not None):
|
|
82
|
+
self.logger.error("AFM model extension, tipAngle must be given for the sphericallyBluntedConic tip, and only for it")
|
|
83
|
+
raise Exception("Tip shape and tip angle not compatible")
|
|
84
|
+
|
|
70
85
|
tipVelocity = params["tipVelocity"]
|
|
71
86
|
|
|
72
87
|
indentationStartStep = params.get("indentationStartStep",0)
|
|
@@ -97,6 +112,13 @@ class AFM(modelExtensionBase):
|
|
|
97
112
|
extension[name]["labels"] = ["idSet_i","idSet_j","epsilon","sigma","K","Kxy","tipVelocity","startChipPosition","indentationStartStep","indentationBackwardStep"]
|
|
98
113
|
extension[name]["data"] = [[tipIds,sampleIds,epsilon,sigma,K,Kxy,tipVelocity,startChipPosition,indentationStartStep,indentationBackwardStep]]
|
|
99
114
|
|
|
115
|
+
if tipShape == "sphericallyBluntedConic":
|
|
116
|
+
extension[name]["type"] = ["AFM","SphericallyBluntedConicTip"]
|
|
117
|
+
#After K and Kxy
|
|
118
|
+
index = extension[name]["labels"].index("Kxy")+1
|
|
119
|
+
extension[name]["labels"].insert(index,"tipAngle")
|
|
120
|
+
extension[name]["data"][0].insert(index,tipAngle)
|
|
121
|
+
|
|
100
122
|
############################################################
|
|
101
123
|
|
|
102
124
|
self.setExtension(extension)
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import sys, os
|
|
2
|
+
|
|
3
|
+
import copy
|
|
4
|
+
|
|
5
|
+
import logging
|
|
6
|
+
|
|
7
|
+
from ... import DEBUG_MODE
|
|
8
|
+
from . import modelBase
|
|
9
|
+
|
|
10
|
+
import pyGrained.models.AdaptiveCG as proteinModel
|
|
11
|
+
|
|
12
|
+
class AdaptiveCG(modelBase):
|
|
13
|
+
"""
|
|
14
|
+
{"author": "Pablo Ibáñez-Freire",
|
|
15
|
+
"description":
|
|
16
|
+
"AdaptiveCG (Adaptive Coarse-Grained) model for protein simulations. The bead mapping
|
|
17
|
+
follows the CG mapping of [Monago2025]_, which places the beads by minimizing the
|
|
18
|
+
total moment of inertia of the atoms about the bead they are assigned to.
|
|
19
|
+
<p>
|
|
20
|
+
In the sharp limit the mapping indicator of Eq. 1 becomes the characteristic function
|
|
21
|
+
of the Voronoi cell of a bead, the assignment reduces to nearest bead, and the
|
|
22
|
+
optimization becomes Lloyd's algorithm. It is therefore implemented as a mass-weighted
|
|
23
|
+
k-means, which is exact rather than approximate: the converged bead is the mass
|
|
24
|
+
centroid of its own Voronoi cell.
|
|
25
|
+
<p>
|
|
26
|
+
Key features of the AdaptiveCG model include:
|
|
27
|
+
<p>
|
|
28
|
+
- Bead placement by mass-weighted k-means, one bead per `resolution` atoms
|
|
29
|
+
<p>
|
|
30
|
+
- Coarse-graining done once per chain class and spread to the whole assembly
|
|
31
|
+
<p>
|
|
32
|
+
- Bonds: an elastic network within each chain
|
|
33
|
+
<p>
|
|
34
|
+
- Native contacts: Morse interactions between beads of different chains
|
|
35
|
+
<p>
|
|
36
|
+
Bonds are always intra-chain and native contacts always inter-chain. This is not
|
|
37
|
+
configurable: the two are complementary by construction, which is what makes the
|
|
38
|
+
chain interfaces the only part of the force field that carries the assembly energy.
|
|
39
|
+
<p>
|
|
40
|
+
This model uses the [pyGrained]_ library to create the AdaptiveCG representation.
|
|
41
|
+
",
|
|
42
|
+
"parameters":{
|
|
43
|
+
"PDB":{"description":"Path to the input PDB file.",
|
|
44
|
+
"type":"str"},
|
|
45
|
+
"resolution":{"description":"Resolution of the coarse-graining, number of atoms per bead. The bead count of a chain is int(N/resolution)+1.",
|
|
46
|
+
"type":"float"},
|
|
47
|
+
"bondsModel":{"description":"Model used for bonded interactions. Only ENM is available, with parameters enmCut and K.",
|
|
48
|
+
"type":"dict"},
|
|
49
|
+
"nativeContactsModel":{"description":"Model used for native contact interactions. Only cutOff is available, with parameters ncCut, epsilon, D and eps0.",
|
|
50
|
+
"type":"dict"},
|
|
51
|
+
"minBeads":{"description":"Minimum number of beads per chain.",
|
|
52
|
+
"type":"int",
|
|
53
|
+
"default":1},
|
|
54
|
+
"seed":{"description":"Seed of the k-means initialization. The mapping is reproducible for a fixed seed.",
|
|
55
|
+
"type":"int",
|
|
56
|
+
"default":0},
|
|
57
|
+
"centerInput":{"description":"If true, centers the input structure.",
|
|
58
|
+
"type":"bool",
|
|
59
|
+
"default":true},
|
|
60
|
+
"SASA":{"description":"If true, calculates the Solvent Accessible Surface Area.",
|
|
61
|
+
"type":"bool",
|
|
62
|
+
"default":false},
|
|
63
|
+
"aggregateChains":{"description":"If true, treats multiple chains as a single entity.",
|
|
64
|
+
"type":"bool",
|
|
65
|
+
"default":true}
|
|
66
|
+
},
|
|
67
|
+
"example":"
|
|
68
|
+
{
|
|
69
|
+
\"type\":\"AdaptiveCG\",
|
|
70
|
+
\"parameters\":{
|
|
71
|
+
\"PDB\":\"capsid.pdb\",
|
|
72
|
+
\"resolution\":250,
|
|
73
|
+
\"bondsModel\":{\"name\":\"ENM\",
|
|
74
|
+
\"parameters\":{\"enmCut\":20.0,\"K\":1.0}},
|
|
75
|
+
\"nativeContactsModel\":{\"name\":\"cutOff\",
|
|
76
|
+
\"parameters\":{\"ncCut\":20.0,\"epsilon\":1.0,
|
|
77
|
+
\"D\":1.0,\"eps0\":1.0}}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
",
|
|
81
|
+
"references":[
|
|
82
|
+
".. [Monago2025] Monago, C., de la Torre, J. A., Delgado-Buscalioni, R., & Espanol, P. (2025). Unraveling internal friction in a coarse-grained protein model. The Journal of Chemical Physics, 162(11), 114115.",
|
|
83
|
+
".. [pyGrained] https://github.com/PabloIbannez/pyGrained"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
"""
|
|
87
|
+
|
|
88
|
+
availableParameters = {"PDB",
|
|
89
|
+
"resolution",
|
|
90
|
+
"minBeads","seed",
|
|
91
|
+
"bondsModel","nativeContactsModel",
|
|
92
|
+
"centerInput",
|
|
93
|
+
"SASA",
|
|
94
|
+
"aggregateChains",
|
|
95
|
+
"additionalExclusions"}
|
|
96
|
+
requiredParameters = {"PDB","resolution","bondsModel","nativeContactsModel"}
|
|
97
|
+
definedSelections = set()
|
|
98
|
+
|
|
99
|
+
def __init__(self,name,**params):
|
|
100
|
+
super().__init__(_type = self.__class__.__name__,
|
|
101
|
+
_name= name,
|
|
102
|
+
availableParameters = self.availableParameters,
|
|
103
|
+
requiredParameters = self.requiredParameters,
|
|
104
|
+
definedSelections = self.definedSelections,
|
|
105
|
+
**params)
|
|
106
|
+
|
|
107
|
+
############################################################
|
|
108
|
+
###################### Set up model ######################
|
|
109
|
+
############################################################
|
|
110
|
+
|
|
111
|
+
#Unlike SBCG, no PDB ID download is accepted. The model is meant for
|
|
112
|
+
#assemblies large enough that the structure is prepared beforehand.
|
|
113
|
+
|
|
114
|
+
if params["PDB"].split(".")[-1] not in ["pdb","pqr"]:
|
|
115
|
+
raise Exception("PDB parameter must be a path to a .pdb or .pqr file.")
|
|
116
|
+
|
|
117
|
+
inputPDBfilePath = params["PDB"]
|
|
118
|
+
|
|
119
|
+
adaptiveParams = {"SASA":params.get("SASA",False),
|
|
120
|
+
"centerInput":params.get("centerInput",True),
|
|
121
|
+
"aggregateChains":params.get("aggregateChains",True),
|
|
122
|
+
"parameters": copy.deepcopy(params),
|
|
123
|
+
"additionalExclusions": params.get("additionalExclusions",False)}
|
|
124
|
+
|
|
125
|
+
adaptive = proteinModel.AdaptiveCG(name = name,
|
|
126
|
+
inputPDBfilePath = inputPDBfilePath,
|
|
127
|
+
params = adaptiveParams,
|
|
128
|
+
debug = DEBUG_MODE)
|
|
129
|
+
|
|
130
|
+
########################################################
|
|
131
|
+
|
|
132
|
+
types = self.getTypes()
|
|
133
|
+
modelTypes = adaptive.getTypes()
|
|
134
|
+
|
|
135
|
+
for _,t in modelTypes.items():
|
|
136
|
+
types.addType(**t)
|
|
137
|
+
|
|
138
|
+
self.setState(adaptive.getState())
|
|
139
|
+
self.setStructure(adaptive.getStructure())
|
|
140
|
+
self.setForceField(adaptive.getForceField())
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def processSelection(self,selectionType,selectionOptions):
|
|
144
|
+
return None
|
|
@@ -13,8 +13,6 @@ from ...utils.geometry.objects.helix import computeHelixMatrix, generateHelix, c
|
|
|
13
13
|
|
|
14
14
|
import random
|
|
15
15
|
|
|
16
|
-
import orthopoly
|
|
17
|
-
|
|
18
16
|
import numpy as np
|
|
19
17
|
from scipy.spatial import cKDTree
|
|
20
18
|
|
|
@@ -40,12 +38,12 @@ class HELIX(modelBase):
|
|
|
40
38
|
<p>
|
|
41
39
|
The model generates a helical structure based on specified parameters such as the number
|
|
42
40
|
of monomers, helix radius, pitch, and helicity. It can be used to study various properties
|
|
43
|
-
and behaviors of helical polymers, including their dynamics, and the
|
|
41
|
+
and behaviors of helical polymers, including their dynamics, and the effects of several
|
|
44
42
|
polymer interactions.
|
|
45
43
|
<p>
|
|
46
44
|
Key features of the HELIX model include:
|
|
47
45
|
<p>
|
|
48
|
-
-
|
|
46
|
+
- Parameters for helical geometry (radius, pitch, helicity)
|
|
49
47
|
<p>
|
|
50
48
|
- Various initialization options (random, line, or pre-formed helix)
|
|
51
49
|
<p>
|
|
@@ -75,7 +73,7 @@ class HELIX(modelBase):
|
|
|
75
73
|
"helicity":{"description":"Helicity of the structure (1.0 for right-handed, -1.0 for left-handed).",
|
|
76
74
|
"type":"float",
|
|
77
75
|
"default":1.0},
|
|
78
|
-
"variant":{"description":"Variant of the model to use ('
|
|
76
|
+
"variant":{"description":"Variant of the model to use ('fixed', 'dynamic').",
|
|
79
77
|
"type":"str"},
|
|
80
78
|
"surface":{"description":"Whether to include a surface interaction.",
|
|
81
79
|
"type":"bool",
|
|
@@ -94,7 +92,7 @@ class HELIX(modelBase):
|
|
|
94
92
|
\"helixRadius\":10.0,
|
|
95
93
|
\"helixPitch\":34.0,
|
|
96
94
|
\"epsilon_mm\":1.0,
|
|
97
|
-
\"variant\":\"
|
|
95
|
+
\"variant\":\"fixed\"
|
|
98
96
|
}
|
|
99
97
|
}
|
|
100
98
|
",
|
|
@@ -259,9 +257,10 @@ class HELIX(modelBase):
|
|
|
259
257
|
self.R_H = computeHelixMatrix(self.helixRadius,self.helixPitch,self.helicity,
|
|
260
258
|
self.monomerRadius*2.0)
|
|
261
259
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
260
|
+
# Convert to quaternion
|
|
261
|
+
q = Rotation.from_matrix(self.R_H).as_quat()
|
|
262
|
+
q = [q[3],q[0],q[1],q[2]] # scalar first
|
|
263
|
+
self.R_Hq = q
|
|
265
264
|
|
|
266
265
|
connectionNext,connectionPrevious = computeConnections(self.helixRadius,self.helixPitch,self.helicity,
|
|
267
266
|
self.monomerRadius*2.0)
|
|
@@ -272,21 +271,17 @@ class HELIX(modelBase):
|
|
|
272
271
|
##############################################
|
|
273
272
|
|
|
274
273
|
# Available variants:
|
|
275
|
-
# -
|
|
276
|
-
# -
|
|
277
|
-
# - dynamicCosine
|
|
278
|
-
# - dynamicExponential
|
|
279
|
-
# - twoStatesCosine
|
|
280
|
-
# - twoStatesExponential
|
|
274
|
+
# - fixed
|
|
275
|
+
# - dynamic
|
|
281
276
|
|
|
282
277
|
self.variantName, self.variantParams = getSubParameters("variant",params)
|
|
283
278
|
|
|
284
|
-
if self.variantName == "
|
|
279
|
+
if self.variantName == "fixed":
|
|
285
280
|
|
|
286
|
-
self.logger.info(f"[HELIX] Using
|
|
281
|
+
self.logger.info(f"[HELIX] Using fixed variant")
|
|
287
282
|
|
|
288
|
-
variantAvailableParameters = {"
|
|
289
|
-
variantRequiredParameters = {"
|
|
283
|
+
variantAvailableParameters = {"Kb","Kw"}
|
|
284
|
+
variantRequiredParameters = {"Kb","Kw"}
|
|
290
285
|
|
|
291
286
|
self.__checkVariantParameters(variantRequiredParameters,variantAvailableParameters)
|
|
292
287
|
|
|
@@ -294,26 +289,12 @@ class HELIX(modelBase):
|
|
|
294
289
|
self.logger.error(f"[HELIX] Init mode {self.init} is not avaible for fixedCosine variant")
|
|
295
290
|
raise Exception("Init mode not available")
|
|
296
291
|
|
|
297
|
-
elif self.variantName == "
|
|
298
|
-
|
|
299
|
-
self.logger.info(f"[HELIX] Using fixedExponential variant")
|
|
300
|
-
|
|
301
|
-
variantAvailableParameters = {"E","Kb","Ka","Kd"}
|
|
302
|
-
variantRequiredParameters = {"E","Kb","Ka","Kd"}
|
|
303
|
-
|
|
304
|
-
self.__checkVariantParameters(variantRequiredParameters,variantAvailableParameters)
|
|
305
|
-
|
|
306
|
-
#Chekc init mode is helix
|
|
307
|
-
if self.init != "helix" and self.init != "line":
|
|
308
|
-
self.logger.error(f"[HELIX] Init mode {self.init} is not avaible for fixedExponential variant")
|
|
309
|
-
raise Exception("Init mode not available")
|
|
310
|
-
|
|
311
|
-
elif self.variantName == "dynamicCosine":
|
|
292
|
+
elif self.variantName == "dynamic":
|
|
312
293
|
|
|
313
294
|
self.logger.info(f"[HELIX] Using dynamicCosine variant")
|
|
314
295
|
|
|
315
|
-
variantAvailableParameters = {"
|
|
316
|
-
variantRequiredParameters = {"
|
|
296
|
+
variantAvailableParameters = {"E","Kb","Kw","rc","energyThreshold","patchRadius"}
|
|
297
|
+
variantRequiredParameters = {"E","Kb","Kw","rc"}
|
|
317
298
|
|
|
318
299
|
self.__checkVariantParameters(variantRequiredParameters,variantAvailableParameters)
|
|
319
300
|
|
|
@@ -323,70 +304,6 @@ class HELIX(modelBase):
|
|
|
323
304
|
if "patchRadius" not in self.variantParams:
|
|
324
305
|
self.variantParams["patchRadius"] = self.monomerRadius/5.0
|
|
325
306
|
|
|
326
|
-
elif self.variantName == "dynamicExponential":
|
|
327
|
-
|
|
328
|
-
self.logger.info(f"[HELIX] Using dynamicExponential variant")
|
|
329
|
-
|
|
330
|
-
variantAvailableParameters = {"energyThreshold","Eb","Ka","Kd","Kb","rc","patchRadius"}
|
|
331
|
-
variantRequiredParameters = {"Eb","Ka","Kd","Kb","rc"}
|
|
332
|
-
|
|
333
|
-
self.__checkVariantParameters(variantRequiredParameters,variantAvailableParameters)
|
|
334
|
-
|
|
335
|
-
if "energyThreshold" not in self.variantParams:
|
|
336
|
-
self.variantParams["energyThreshold"] = 0.0
|
|
337
|
-
|
|
338
|
-
if "patchRadius" not in self.variantParams:
|
|
339
|
-
self.variantParams["patchRadius"] = self.monomerRadius/5.0
|
|
340
|
-
|
|
341
|
-
elif self.variantName == "twoStatesCosine":
|
|
342
|
-
|
|
343
|
-
self.logger.info(f"[HELIX] Using twoStatesCosine variant")
|
|
344
|
-
|
|
345
|
-
variantAvailableParameters = {"energyThreshold","patchRadius",
|
|
346
|
-
"theta_start_0","theta_end_0","phi_start_0","phi_end_0",
|
|
347
|
-
"theta_start_1","theta_end_1","phi_start_1","phi_end_1",
|
|
348
|
-
"r_start_0","r_start_1","rc_0","rc_1",
|
|
349
|
-
"prob_0_to_1","prob_1_to_0"}
|
|
350
|
-
|
|
351
|
-
variantRequiredParameters = {"patchRadius",
|
|
352
|
-
"theta_start_0","theta_end_0","phi_start_0","phi_end_0",
|
|
353
|
-
"theta_start_1","theta_end_1","phi_start_1","phi_end_1",
|
|
354
|
-
"r_start_0","r_start_1","rc_0","rc_1",
|
|
355
|
-
"prob_0_to_1","prob_1_to_0"}
|
|
356
|
-
|
|
357
|
-
self.__checkVariantParameters(variantRequiredParameters,variantAvailableParameters)
|
|
358
|
-
|
|
359
|
-
if "energyThreshold" not in self.variantParams:
|
|
360
|
-
self.variantParams["energyThreshold"] = 0.0
|
|
361
|
-
|
|
362
|
-
if "patchRadius" not in self.variantParams:
|
|
363
|
-
self.variantParams["patchRadius"] = self.monomerRadius/5.0
|
|
364
|
-
|
|
365
|
-
elif self.variantName == "twoStatesExponential":
|
|
366
|
-
|
|
367
|
-
self.logger.info(f"[HELIX] Using twoStatesExponential variant")
|
|
368
|
-
|
|
369
|
-
variantAvailableParameters = {"energyThreshold","patchRadius",
|
|
370
|
-
"Ka_0","Kd_0","Kb_0",
|
|
371
|
-
"Ka_1","Kd_1","Kb_1",
|
|
372
|
-
"Kb_0","Kb_1",
|
|
373
|
-
"rc_0","rc_1",
|
|
374
|
-
"prob_0_to_1","prob_1_to_0"}
|
|
375
|
-
|
|
376
|
-
variantRequiredParameters = {"patchRadius",
|
|
377
|
-
"Ka_0","Kd_0","Kb_0",
|
|
378
|
-
"Ka_1","Kd_1","Kb_1",
|
|
379
|
-
"Kb_0","Kb_1",
|
|
380
|
-
"rc_0","rc_1",
|
|
381
|
-
"prob_0_to_1","prob_1_to_0"}
|
|
382
|
-
|
|
383
|
-
self.__checkVariantParameters(variantRequiredParameters,variantAvailableParameters)
|
|
384
|
-
|
|
385
|
-
if "energyThreshold" not in self.variantParams:
|
|
386
|
-
self.variantParams["energyThreshold"] = 0.0
|
|
387
|
-
|
|
388
|
-
if "patchRadius" not in self.variantParams:
|
|
389
|
-
self.variantParams["patchRadius"] = self.monomerRadius/5.0
|
|
390
307
|
|
|
391
308
|
else:
|
|
392
309
|
self.logger.error(f"[HELIX] Variant {self.variantName} not available")
|
|
@@ -467,30 +384,23 @@ class HELIX(modelBase):
|
|
|
467
384
|
|
|
468
385
|
############Helix
|
|
469
386
|
|
|
470
|
-
if "fixed"
|
|
387
|
+
if "fixed" == self.variantName.strip():
|
|
471
388
|
|
|
472
389
|
forceField["helix"]={}
|
|
473
|
-
|
|
474
|
-
forceField["helix"]["type"] = ["Bond2", "HelixCosine"]
|
|
475
|
-
elif self.variantName == "fixedExponential":
|
|
476
|
-
forceField["helix"]["type"] = ["Bond2", "HelixExponential"]
|
|
390
|
+
forceField["helix"]["type"] = ["Bond2", "HarmonicRAP"]
|
|
477
391
|
|
|
478
|
-
forceField["helix"]["
|
|
479
|
-
|
|
480
|
-
forceField["helix"]["parameters"]["e_x"] = self.e_x
|
|
481
|
-
forceField["helix"]["parameters"]["e_y"] = self.e_y
|
|
482
|
-
forceField["helix"]["parameters"]["e_z"] = self.e_z
|
|
392
|
+
forceField["helix"]["labels"] = ["id_i","id_j","Khrm","r0","leftConnection","rightConnection","Krap","R"]
|
|
393
|
+
forceField["helix"]["data"] = []
|
|
483
394
|
|
|
484
|
-
|
|
485
|
-
|
|
395
|
+
Kb = self.variantParams["Kb"]
|
|
396
|
+
Kw = self.variantParams["Kw"]
|
|
486
397
|
|
|
487
|
-
|
|
488
|
-
forceField["helix"]["data"] = []
|
|
398
|
+
Rq = self.R_Hq
|
|
489
399
|
|
|
490
400
|
for i in range(self.nMonomers-1):
|
|
491
|
-
forceField["helix"]["data"].append([i,i+1])
|
|
401
|
+
forceField["helix"]["data"].append([i,i+1,Kb,0.0,self.e_prev,self.e_next,Kw,Rq])
|
|
492
402
|
|
|
493
|
-
|
|
403
|
+
elif "dynamic" == self.variantName.strip():
|
|
494
404
|
|
|
495
405
|
patchRadius = self.variantParams["patchRadius"]
|
|
496
406
|
|
|
@@ -541,27 +451,21 @@ class HELIX(modelBase):
|
|
|
541
451
|
forceField["helix"]["patchesTopology"]["forceField"]["helix"]={}
|
|
542
452
|
forceField["helix"]["patchesTopology"]["forceField"]["helix"]["parameters"] = {"condition":"inter"}
|
|
543
453
|
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
self.variantParams["rc"],
|
|
560
|
-
self.e_x,self.e_y,self.e_z]]
|
|
561
|
-
|
|
562
|
-
else:
|
|
563
|
-
#Not implemented yet
|
|
564
|
-
raise Exception("Not implemented yet")
|
|
454
|
+
E = self.variantParams["E"]
|
|
455
|
+
Kb = self.variantParams["Kb"]
|
|
456
|
+
Kw = self.variantParams["Kw"]
|
|
457
|
+
rc = self.variantParams["rc"]
|
|
458
|
+
Rq = self.R_Hq
|
|
459
|
+
Rqinv = [Rq[0],-Rq[1],-Rq[2],-Rq[3]]
|
|
460
|
+
|
|
461
|
+
forceField["helix"]["patchesTopology"]["forceField"]["helix"]["type"] = ["NonBondedPatches", "COSRAP"]
|
|
462
|
+
forceField["helix"]["patchesTopology"]["forceField"]["helix"]["labels"] = ["name_i", "name_j", "E", "rc", "R", "Kswt", "Krap"]
|
|
463
|
+
forceField["helix"]["patchesTopology"]["forceField"]["helix"]["data"] = [["S", "E", E, rc, Rq, Kb, Kw],
|
|
464
|
+
["E", "S", E, rc, Rqinv, Kb, Kw]]
|
|
465
|
+
else:
|
|
466
|
+
#Not implemented yet
|
|
467
|
+
self.logger.error(f"[HELIX] Variant {self.variantName} not implemented yet")
|
|
468
|
+
raise Exception("Not implemented yet")
|
|
565
469
|
|
|
566
470
|
#############Patches
|
|
567
471
|
|
|
@@ -84,7 +84,8 @@ class SBCG(modelBase):
|
|
|
84
84
|
"bondsModel","nativeContactsModel",
|
|
85
85
|
"centerInput",
|
|
86
86
|
"SASA",
|
|
87
|
-
"aggregateChains"
|
|
87
|
+
"aggregateChains",
|
|
88
|
+
"additionalExclusions"}
|
|
88
89
|
requiredParameters = {"PDB","resolution","steps","bondsModel","nativeContactsModel"}
|
|
89
90
|
definedSelections = set()
|
|
90
91
|
|
|
@@ -113,7 +114,8 @@ class SBCG(modelBase):
|
|
|
113
114
|
sbcgParams = {"SASA":params.get("SASA",True),
|
|
114
115
|
"centerInput":params.get("centerInput",True),
|
|
115
116
|
"aggregateChains":params.get("aggregateChains",True),
|
|
116
|
-
"parameters": copy.deepcopy(params)
|
|
117
|
+
"parameters": copy.deepcopy(params),
|
|
118
|
+
"additionalExclusions": params.get("additionalExclusions",False)}
|
|
117
119
|
|
|
118
120
|
sbcg = proteinModel.SBCG(name = name,
|
|
119
121
|
inputPDBfilePath = inputPDBfilePath,
|
|
@@ -64,11 +64,6 @@ class patchPolymersMeasurement(simulationStepBase):
|
|
|
64
64
|
############################################################
|
|
65
65
|
############################################################
|
|
66
66
|
|
|
67
|
-
#Check if intervalStep is different from 1. If so, raise an error
|
|
68
|
-
if params.get("intervalStep") != 1:
|
|
69
|
-
self.logger.error("[PatchPolymersMeasurement] intervalStep must be 1")
|
|
70
|
-
raise Exception("Not valid intervalStep")
|
|
71
|
-
|
|
72
67
|
parameters = {}
|
|
73
68
|
|
|
74
69
|
parameters["outputFilePath"] = params["outputFilePath"]
|
|
@@ -43,6 +43,10 @@ class HighThroughputAFM(VLMP.VLMP):
|
|
|
43
43
|
self.K = parameters["AFM"]["K"]
|
|
44
44
|
self.Kxy = parameters["AFM"]["Kxy"]
|
|
45
45
|
|
|
46
|
+
#The shape is common to all the samples, different shapes can not be in the same batch
|
|
47
|
+
self.tipShape = parameters["AFM"].get("tipShape","spherical")
|
|
48
|
+
self.tipAngle = parameters["AFM"].get("tipAngle",None)
|
|
49
|
+
|
|
46
50
|
self.epsilon = parameters["AFM"]["epsilon"]
|
|
47
51
|
self.sigma = parameters["AFM"]["sigma"]
|
|
48
52
|
|
|
@@ -209,6 +213,7 @@ class HighThroughputAFM(VLMP.VLMP):
|
|
|
209
213
|
|
|
210
214
|
|
|
211
215
|
allParameters = ["K", "Kxy",
|
|
216
|
+
"tipAngle",
|
|
212
217
|
"epsilon",
|
|
213
218
|
"sigma",
|
|
214
219
|
"tipVelocity",
|
|
@@ -269,6 +274,8 @@ class HighThroughputAFM(VLMP.VLMP):
|
|
|
269
274
|
K_smp = self.K[index]
|
|
270
275
|
Kxy_smp = self.Kxy[index]
|
|
271
276
|
|
|
277
|
+
tipAngle_smp = self.tipAngle[index]
|
|
278
|
+
|
|
272
279
|
epsilon_smp = self.epsilon[index]
|
|
273
280
|
sigma_smp = self.sigma[index]
|
|
274
281
|
|
|
@@ -346,6 +353,8 @@ class HighThroughputAFM(VLMP.VLMP):
|
|
|
346
353
|
#Add AFM
|
|
347
354
|
|
|
348
355
|
sim["modelExtensions"].append({"type":"AFM","parameters":{"K":K_smp,"Kxy":Kxy_smp,
|
|
356
|
+
"tipShape":self.tipShape,
|
|
357
|
+
"tipAngle":tipAngle_smp,
|
|
349
358
|
"epsilon":epsilon_smp,
|
|
350
359
|
"sigma":sigma_smp,
|
|
351
360
|
"tipVelocity":tipVelocity_smp,
|
|
@@ -437,11 +446,16 @@ class AnalysisAFM:
|
|
|
437
446
|
def __init__(self,
|
|
438
447
|
VLMPsessionFilePath,
|
|
439
448
|
outputUnits,
|
|
449
|
+
outputType,
|
|
440
450
|
maxForce = None,
|
|
441
451
|
plotTime = False):
|
|
442
452
|
|
|
443
453
|
self.logger = logging.getLogger("VLMP")
|
|
444
454
|
|
|
455
|
+
if outputType not in ["window","file"]:
|
|
456
|
+
self.logger.error("[AnalysisAFM] Output type %s not available, available types are: window, file" % outputType)
|
|
457
|
+
raise Exception("Output type not available")
|
|
458
|
+
|
|
445
459
|
########################################################
|
|
446
460
|
|
|
447
461
|
self.VLMPsessionFilePath = VLMPsessionFilePath
|
|
@@ -450,6 +464,7 @@ class AnalysisAFM:
|
|
|
450
464
|
self.VLMPsession = json.load(f)
|
|
451
465
|
|
|
452
466
|
self.outputUnits = outputUnits
|
|
467
|
+
self.outputType = outputType
|
|
453
468
|
self.maxForce = maxForce
|
|
454
469
|
self.plotTime = plotTime
|
|
455
470
|
|
|
@@ -502,11 +517,16 @@ class AnalysisAFM:
|
|
|
502
517
|
if self.plotTime:
|
|
503
518
|
ax2 = ax.twinx()
|
|
504
519
|
ax2.plot(X,T,"--",color="red")
|
|
505
|
-
f.show()
|
|
506
520
|
|
|
507
521
|
if self.maxForce is not None:
|
|
508
522
|
ax.set_ylim([np.min(F),self.maxForce])
|
|
509
523
|
|
|
524
|
+
if self.outputType == "window":
|
|
525
|
+
f.show()
|
|
526
|
+
else:
|
|
527
|
+
f.savefig("/".join(self.VLMPsessionFilePath.split("/")[:-1]) + "/results/" + name + "/afm.png")
|
|
528
|
+
plt.close(f)
|
|
529
|
+
|
|
510
530
|
indentationProcessedFilePath = "/".join(self.VLMPsessionFilePath.split("/")[:-1]) + "/results/" + name + "/afm_processed.dat"
|
|
511
531
|
with open(indentationProcessedFilePath,"w") as f:
|
|
512
532
|
f.write("# {} {}\n".format(Xunits,Funits))
|
|
@@ -514,4 +534,5 @@ class AnalysisAFM:
|
|
|
514
534
|
f.write("{} {}\n".format(X[i],F[i]))
|
|
515
535
|
|
|
516
536
|
#Wait for plots to be closed
|
|
517
|
-
|
|
537
|
+
if self.outputType == "window":
|
|
538
|
+
input("Press enter to continue...")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pyVLMP
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.76
|
|
4
4
|
Summary: Virtual Lab Modeling Platform
|
|
5
5
|
Home-page: https://github.com/PabloIbannez/pyGrained
|
|
6
6
|
Author-email: Pablo Ibáñez-Freire <p.ibanez.fre@gmail.com>
|
|
@@ -20,6 +20,9 @@ Requires-Dist: tqdm
|
|
|
20
20
|
Requires-Dist: pyGrained
|
|
21
21
|
Requires-Dist: JFIO
|
|
22
22
|
Requires-Dist: pyUAMMD
|
|
23
|
+
Requires-Dist: colorama
|
|
24
|
+
Dynamic: home-page
|
|
25
|
+
Dynamic: license-file
|
|
23
26
|
|
|
24
27
|
# VLMP (Virtual Lab Modeling Platform)
|
|
25
28
|
|
|
@@ -51,6 +51,7 @@ VLMP/components/modelOperations/setContactDistance.py
|
|
|
51
51
|
VLMP/components/modelOperations/setParticleLowestPosition.py
|
|
52
52
|
VLMP/components/modelOperations/setParticlePositions.py
|
|
53
53
|
VLMP/components/modelOperations/setParticleXYPosition.py
|
|
54
|
+
VLMP/components/models/AdaptiveCG.py
|
|
54
55
|
VLMP/components/models/CORONAVIRUS.py
|
|
55
56
|
VLMP/components/models/ENM.py
|
|
56
57
|
VLMP/components/models/FILE.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name="pyVLMP"
|
|
3
|
-
version="1.0.
|
|
3
|
+
version="1.0.76"
|
|
4
4
|
authors = [
|
|
5
5
|
{name = "Pablo Ibáñez-Freire", email = "p.ibanez.fre@gmail.com"},
|
|
6
6
|
]
|
|
@@ -18,7 +18,7 @@ classifiers = [
|
|
|
18
18
|
"Programming Language :: Python :: 3.9",
|
|
19
19
|
]
|
|
20
20
|
dependencies = [
|
|
21
|
-
"jsbeautifier","tqdm","pyGrained","JFIO","pyUAMMD"
|
|
21
|
+
"jsbeautifier","tqdm","pyGrained","JFIO","pyUAMMD","colorama"
|
|
22
22
|
]
|
|
23
23
|
|
|
24
24
|
[options]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/integrators/EulerMaruyamaRigidBodyPatchesState.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constantForceBetweenCentersOfMass.py
RENAMED
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constantForceOverCenterOfMass.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constantTorqueOverCenterOfMass.py
RENAMED
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constraintCenterOfMassPosition.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constraintParticlesPosition.py
RENAMED
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/constraintParticlesPositionLambda.py
RENAMED
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelExtensions/harmonicBondBetweenCentersOfMass.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelOperations/alignInertiaMomentAlongVector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/modelOperations/setParticleLowestPosition.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/forceBetweenSetsMeasurement.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/meanMagnetizationMeasurement.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/nativeContactsMeasurement.py
RENAMED
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/oscillatoryForceMeasurment.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyvlmp-1.0.71 → pyvlmp-1.0.76}/VLMP/components/simulationSteps/potentialEnergyMeasurement.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|