File tree Expand file tree Collapse file tree 8 files changed +19
-19
lines changed
Expand file tree Collapse file tree 8 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 1313from openmm import unit as mmunit
1414
1515from .collective_variable import CollectiveVariable
16- from .units import ScalarQuantity
16+ from .units import Quantity , ScalarQuantity
1717from .utils import evaluate_in_context
1818
1919ONE_4PI_EPS0 = 138.93545764438198
@@ -173,7 +173,7 @@ def __init__( # pylint: disable=too-many-locals
173173 group2 : t .Iterable [int ],
174174 nonbondedForce : openmm .NonbondedForce ,
175175 contrastGroup : t .Optional [t .Iterable [int ]] = None ,
176- reference : t .Union [ScalarQuantity , openmm .Context ] = (
176+ reference : t .Union [ScalarQuantity , openmm .Context ] = Quantity (
177177 1.0 * mmunit .kilojoule_per_mole
178178 ),
179179 contrastScaling : float = 1.0 ,
Original file line number Diff line number Diff line change 1414from openmm import unit as mmunit
1515
1616from .collective_variable import CollectiveVariable
17- from .units import ScalarQuantity
17+ from .units import Quantity , ScalarQuantity
1818
1919
2020class HelixAngleContent (openmm .CustomAngleForce , CollectiveVariable ):
@@ -95,8 +95,8 @@ def __init__(
9595 self ,
9696 residues : t .Sequence [mmapp .topology .Residue ],
9797 pbc : bool = False ,
98- thetaReference : ScalarQuantity = 88 * mmunit .degrees ,
99- tolerance : ScalarQuantity = 15 * mmunit .degrees ,
98+ thetaReference : ScalarQuantity = Quantity ( 88 * mmunit .degrees ) ,
99+ tolerance : ScalarQuantity = Quantity ( 15 * mmunit .degrees ) ,
100100 halfExponent : int = 3 ,
101101 normalize : bool = False ,
102102 name : str = "helix_angle_content" ,
Original file line number Diff line number Diff line change 1515from openmm import unit as mmunit
1616
1717from .collective_variable import CollectiveVariable
18- from .units import ScalarQuantity
18+ from .units import Quantity , ScalarQuantity
1919
2020
2121class HelixHBondContent (openmm .CustomBondForce , CollectiveVariable ):
@@ -83,7 +83,7 @@ def __init__(
8383 self ,
8484 residues : t .Sequence [mmapp .topology .Residue ],
8585 pbc : bool = False ,
86- thresholdDistance : ScalarQuantity = 0.33 * mmunit .nanometers ,
86+ thresholdDistance : ScalarQuantity = Quantity ( 0.33 * mmunit .nanometers ) ,
8787 halfExponent : int = 3 ,
8888 normalize : bool = False ,
8989 name : str = "helix_hbond_content" ,
Original file line number Diff line number Diff line change 1313from openmm import unit as mmunit
1414
1515from .base_rmsd_content import BaseRMSDContent
16- from .units import ScalarQuantity
16+ from .units import Quantity , ScalarQuantity
1717
1818# pylint: disable=protected-access
1919ALPHA_POSITIONS = BaseRMSDContent ._loadPositions ("ideal_alpha_helix.csv" )
@@ -131,7 +131,7 @@ def __init__(
131131 self ,
132132 residues : t .Sequence [mmapp .topology .Residue ],
133133 numAtoms : int ,
134- thresholdRMSD : ScalarQuantity = 0.08 * mmunit .nanometers ,
134+ thresholdRMSD : ScalarQuantity = Quantity ( 0.08 * mmunit .nanometers ) ,
135135 stepFunction : str = "(1+x^4)/(1+x^4+x^8)" ,
136136 normalize : bool = False ,
137137 name : str = "helix_rmsd_content" ,
Original file line number Diff line number Diff line change 1414from openmm import unit as mmunit
1515
1616from .collective_variable import CollectiveVariable
17- from .units import ScalarQuantity
17+ from .units import Quantity , ScalarQuantity
1818
1919
2020class HelixTorsionContent (openmm .CustomTorsionForce , CollectiveVariable ):
@@ -105,9 +105,9 @@ def __init__(
105105 self ,
106106 residues : t .Sequence [mmapp .topology .Residue ],
107107 pbc : bool = False ,
108- phiReference : ScalarQuantity = - 63.8 * mmunit .degrees ,
109- psiReference : ScalarQuantity = - 41.1 * mmunit .degrees ,
110- tolerance : ScalarQuantity = 25 * mmunit .degrees ,
108+ phiReference : ScalarQuantity = Quantity ( - 63.8 * mmunit .degrees ) ,
109+ psiReference : ScalarQuantity = Quantity ( - 41.1 * mmunit .degrees ) ,
110+ tolerance : ScalarQuantity = Quantity ( 25 * mmunit .degrees ) ,
111111 halfExponent : int = 3 ,
112112 normalize : bool = False ,
113113 name : str = "helix_torsion_content" ,
Original file line number Diff line number Diff line change 1414from openmm import unit as mmunit
1515
1616from .collective_variable import CollectiveVariable
17- from .units import ScalarQuantity
17+ from .units import Quantity , ScalarQuantity
1818from .utils import evaluate_in_context
1919
2020
@@ -130,7 +130,7 @@ def __init__(
130130 nonbondedForce : openmm .NonbondedForce ,
131131 reference : t .Union [Real , openmm .Context ] = 1.0 ,
132132 stepFunction : str = "1/(1+x^6)" ,
133- thresholdDistance : ScalarQuantity = 0.3 * mmunit .nanometers ,
133+ thresholdDistance : ScalarQuantity = Quantity ( 0.3 * mmunit .nanometers ) ,
134134 cutoffFactor : float = 2.0 ,
135135 switchFactor : t .Optional [float ] = 1.5 ,
136136 name : str = "number_of_contacts" ,
Original file line number Diff line number Diff line change 1515from openmm .app .topology import Residue
1616
1717from .collective_variable import CollectiveVariable
18- from .units import ScalarQuantity , value_in_md_units
18+ from .units import Quantity , ScalarQuantity , value_in_md_units
1919
2020
2121class ResidueCoordination (openmm .CustomCentroidBondForce , CollectiveVariable ):
@@ -111,7 +111,7 @@ def __init__(
111111 residueGroup2 : t .Iterable [Residue ],
112112 pbc : bool = True ,
113113 stepFunction : str = "1/(1+x^6)" ,
114- thresholdDistance : ScalarQuantity = 1.0 * mmunit .nanometers ,
114+ thresholdDistance : ScalarQuantity = Quantity ( 1.0 * mmunit .nanometers ) ,
115115 normalize : bool = False ,
116116 weighByMass : bool = True ,
117117 includeHydrogens : bool = True ,
Original file line number Diff line number Diff line change 1414from openmm import unit as mmunit
1515
1616from .base_rmsd_content import BaseRMSDContent
17- from .units import ScalarQuantity
17+ from .units import Quantity , ScalarQuantity
1818
1919# pylint: disable=protected-access
2020PARABETA_POSITIONS = BaseRMSDContent ._loadPositions ("ideal_parallel_beta_sheet.csv" )
@@ -182,7 +182,7 @@ def __init__(
182182 numAtoms : int ,
183183 parallel : bool = False ,
184184 blockSizes : t .Optional [t .Sequence [int ]] = None ,
185- thresholdRMSD : ScalarQuantity = 0.08 * mmunit .nanometers ,
185+ thresholdRMSD : ScalarQuantity = Quantity ( 0.08 * mmunit .nanometers ) ,
186186 stepFunction : str = "(1+x^4)/(1+x^4+x^8)" ,
187187 normalize : bool = False ,
188188 name : str = "sheet_rmsd_content" ,
You can’t perform that action at this time.
0 commit comments