Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
a3ab5dcd
Commit
a3ab5dcd
authored
Jul 02, 2015
by
eric pellegrini
Browse files
Updated the analysis related to the introduction of AtomsList
configurator
parent
0c817605
Changes
3
Hide whitespace changes
Inline
Side-by-side
MDANSE/Framework/Jobs/AngularCorrelation.py
View file @
a3ab5dcd
...
...
@@ -72,8 +72,9 @@ class AngularCorrelation(IJob):
settings
=
collections
.
OrderedDict
()
settings
[
'trajectory'
]
=
(
'mmtk_trajectory'
,{})
settings
[
'frames'
]
=
(
'frames'
,
{
"dependencies"
:{
'trajectory'
:
'trajectory'
}})
settings
[
'axis_selection'
]
=
(
'axis_selection'
,{
"dependencies"
:{
'trajectory'
:
'trajectory'
},
'default'
:
{
'molecule'
:
'Water'
,
'endpoint1'
:(
'OW'
,),
'endpoint2'
:(
'HW'
,)}})
settings
[
'axis_selection'
]
=
(
'atoms_list'
,{
"nAtoms"
:
2
,
"dependencies"
:{
'trajectory'
:
'trajectory'
},
'default'
:
(
'Water'
,(
'OW'
,
'HW'
))})
settings
[
'per_axis'
]
=
(
'boolean'
,
{
"label"
:
"output contribution per axis"
,
"default"
:
False
})
settings
[
'output_files'
]
=
(
'output_files'
,
{
"formats"
:[
"netcdf"
,
"ascii"
]})
settings
[
'running_mode'
]
=
(
'running_mode'
,{})
...
...
@@ -83,16 +84,16 @@ class AngularCorrelation(IJob):
Initialize the input parameters and analysis self variables
"""
self
.
numberOfSteps
=
self
.
configuration
[
'axis_selection'
][
'n_
axi
s'
]
self
.
numberOfSteps
=
self
.
configuration
[
'axis_selection'
][
'n_
value
s'
]
self
.
_outputData
.
add
(
"times"
,
"line"
,
self
.
configuration
[
'frames'
][
'time'
],
units
=
'ps'
)
self
.
_outputData
.
add
(
"axis_index"
,
"line"
,
numpy
.
arange
(
self
.
configuration
[
'axis_selection'
][
'n_
axi
s'
]),
units
=
'au'
)
self
.
_outputData
.
add
(
"axis_index"
,
"line"
,
numpy
.
arange
(
self
.
configuration
[
'axis_selection'
][
'n_
value
s'
]),
units
=
'au'
)
self
.
_outputData
.
add
(
'ac'
,
"line"
,
(
self
.
configuration
[
'frames'
][
'number'
],),
axis
=
"times"
,
units
=
"au"
)
if
self
.
configuration
[
'per_axis'
][
'value'
]:
self
.
_outputData
.
add
(
'ac_per_axis'
,
"surface"
,
(
self
.
configuration
[
'axis_selection'
][
'n_
axi
s'
],
self
.
configuration
[
'frames'
][
'number'
],),
axis
=
'axis_index|times'
,
units
=
"au"
)
self
.
_outputData
.
add
(
'ac_per_axis'
,
"surface"
,
(
self
.
configuration
[
'axis_selection'
][
'n_
value
s'
],
self
.
configuration
[
'frames'
][
'number'
],),
axis
=
'axis_index|times'
,
units
=
"au"
)
def
run_step
(
self
,
index
):
"""
...
...
@@ -105,7 +106,7 @@ class AngularCorrelation(IJob):
#. vectors (numpy.array): The calculated vectors
"""
e1
,
e2
=
self
.
configuration
[
'axis_selection'
][
'
endpoint
s'
][
index
]
e1
,
e2
=
self
.
configuration
[
'axis_selection'
][
'
atom
s'
][
index
]
e1
=
read_atoms_trajectory
(
self
.
configuration
[
"trajectory"
][
"instance"
],
e1
,
...
...
@@ -147,7 +148,7 @@ class AngularCorrelation(IJob):
Finalizes the calculations (e.g. averaging the total term, output files creations ...).
"""
self
.
_outputData
[
'ac'
]
/=
self
.
configuration
[
'axis_selection'
][
'n_
axi
s'
]
self
.
_outputData
[
'ac'
]
/=
self
.
configuration
[
'axis_selection'
][
'n_
value
s'
]
self
.
_outputData
.
write
(
self
.
configuration
[
'output_files'
][
'root'
],
self
.
configuration
[
'output_files'
][
'formats'
],
self
.
_info
)
...
...
MDANSE/Framework/Jobs/OrderParameter.py
View file @
a3ab5dcd
...
...
@@ -82,8 +82,9 @@ class OrderParameter(IJob):
settings
=
collections
.
OrderedDict
()
settings
[
'trajectory'
]
=
(
'mmtk_trajectory'
,
{
'default'
:
os
.
path
.
join
(
'..'
,
'..'
,
'..'
,
'Data'
,
'Trajectories'
,
'MMTK'
,
'protein_in_periodic_universe.nc'
)})
settings
[
'frames'
]
=
(
'frames'
,
{
'dependencies'
:{
'trajectory'
:
'trajectory'
}})
settings
[
'axis_selection'
]
=
(
'axis_selection'
,
{
'dependencies'
:{
'trajectory'
:
'trajectory'
},
'default'
:{
'molecule'
:
'C284H438N84O79S7'
,
'endpoint1'
:(
'C'
,),
'endpoint2'
:(
'C_beta'
,)}})
settings
[
'axis_selection'
]
=
(
'atoms_list'
,
{
'dependencies'
:{
'trajectory'
:
'trajectory'
},
'nAtoms'
:
2
,
'default'
:(
'C284H438N84O79S7'
,(
'C'
,
'C_beta'
))})
settings
[
'reference_direction'
]
=
(
'vector'
,
{
'default'
:[
0
,
0
,
1
],
'notNull'
:
True
,
'normalize'
:
True
})
settings
[
'per_axis'
]
=
(
'boolean'
,
{
'label'
:
"output contribution per axis"
,
'default'
:
False
})
settings
[
'output_files'
]
=
(
'output_files'
,
{
'formats'
:[
"netcdf"
,
"ascii"
]})
...
...
@@ -95,13 +96,13 @@ class OrderParameter(IJob):
"""
self
.
_nFrames
=
self
.
configuration
[
'frames'
][
'number'
]
self
.
_nAxis
=
self
.
configuration
[
'axis_selection'
][
'n_
axi
s'
]
self
.
_nAxis
=
self
.
configuration
[
'axis_selection'
][
'n_
value
s'
]
self
.
numberOfSteps
=
self
.
_nAxis
self
.
_outputData
.
add
(
"times"
,
"line"
,
self
.
configuration
[
'frames'
][
'time'
],
units
=
'ps'
)
self
.
_outputData
.
add
(
"axis_index"
,
"line"
,
numpy
.
arange
(
self
.
configuration
[
'axis_selection'
][
'n_
axi
s'
]),
units
=
'au'
)
self
.
_outputData
.
add
(
"axis_index"
,
"line"
,
numpy
.
arange
(
self
.
configuration
[
'axis_selection'
][
'n_
value
s'
]),
units
=
'au'
)
self
.
_zAxis
=
Vector
([
0
,
0
,
1
])
refAxis
=
self
.
configuration
[
'reference_direction'
][
'value'
]
...
...
@@ -134,7 +135,7 @@ class OrderParameter(IJob):
:rtype: 2-tuple
"""
e1
,
e2
=
self
.
configuration
[
'axis_selection'
][
'
endpoint
s'
][
index
]
e1
,
e2
=
self
.
configuration
[
'axis_selection'
][
'
atom
s'
][
index
]
e1
=
read_atoms_trajectory
(
self
.
configuration
[
"trajectory"
][
"instance"
],
e1
,
...
...
MDANSE/Framework/Jobs/SpatialDensity.py
View file @
a3ab5dcd
...
...
@@ -67,7 +67,8 @@ class SpatialDensity(IJob):
settings
[
'frames'
]
=
(
'frames'
,
{
'dependencies'
:{
'trajectory'
:
'trajectory'
}})
settings
[
'spatial_resolution'
]
=
(
'float'
,
{
'mini'
:
0.01
,
'default'
:
0.1
})
settings
[
'reference_basis'
]
=
(
'basis_selection'
,
{
'dependencies'
:{
'trajectory'
:
'trajectory'
},
'default'
:{
'molecule'
:
'C284H438N84O79S7'
,
'origin'
:(
'O'
,),
'x_axis'
:(
'C_beta'
,),
'y_axis'
:(
'C_delta'
,)}})
'nAtoms'
:
3
,
'default'
:(
'C284H438N84O79S7'
,(
'O'
,
'C_beta'
,
'C_delta'
))})
settings
[
'target_molecule'
]
=
(
'atom_selection'
,
{
'dependencies'
:{
'trajectory'
:
'trajectory'
},
'default'
:
'atom_index 151'
})
settings
[
'output_files'
]
=
(
'output_files'
,
{
'formats'
:[
"netcdf"
,
"ascii"
]})
...
...
@@ -139,12 +140,12 @@ class SpatialDensity(IJob):
conf
=
self
.
configuration
[
'trajectory'
][
'instance'
].
universe
.
contiguousObjectConfiguration
()
origins
=
numpy
.
zeros
((
self
.
configuration
[
'reference_basis'
][
'n_
basi
s'
],
3
),
dtype
=
numpy
.
float64
)
bases
=
numpy
.
zeros
((
self
.
configuration
[
'reference_basis'
][
'n_
basi
s'
],
3
,
3
),
dtype
=
numpy
.
float64
)
origins
=
numpy
.
zeros
((
self
.
configuration
[
'reference_basis'
][
'n_
value
s'
],
3
),
dtype
=
numpy
.
float64
)
bases
=
numpy
.
zeros
((
self
.
configuration
[
'reference_basis'
][
'n_
value
s'
],
3
,
3
),
dtype
=
numpy
.
float64
)
indexes
=
numpy
.
array
(
self
.
configuration
[
'target_molecule'
][
'indexes'
]).
astype
(
numpy
.
int32
)
for
i
,
basis
in
enumerate
(
self
.
configuration
[
'reference_basis'
][
'
basi
s'
]):
for
i
,
basis
in
enumerate
(
self
.
configuration
[
'reference_basis'
][
'
atom
s'
]):
originIndexes
,
xIndexes
,
yIndexes
=
basis
origins
[
i
,:]
=
center_of_mass
(
conf
.
array
[
originIndexes
],
None
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment