Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
ffd0bc20
Commit
ffd0bc20
authored
Jun 04, 2015
by
eric pellegrini
Browse files
Bug fix in AtomSelectionPlugin
Slight change in atom selection selectors name
parent
9f8c10a8
Changes
21
Hide whitespace changes
Inline
Side-by-side
MDANSE/App/GUI/Framework/Plugins/AtomSelectionPlugin.py
View file @
ffd0bc20
...
...
@@ -139,12 +139,13 @@ class Query(object):
return
[]
try
:
selection
=
self
.
_parser
(
self
.
get_expression
(),
True
)
expression
=
self
.
get_expression
()
selection
=
self
.
_parser
.
parse
(
expression
)
except
AtomSelectionParserError
:
selection
=
(
""
,[])
return
selection
return
(
""
,[])
else
:
return
(
expression
,
selection
)
def
pop
(
self
):
return
self
.
_list
.
pop
()
...
...
@@ -178,7 +179,7 @@ class AtomSelectionPlugin(ComponentPlugin):
self
.
_mainPanel
=
wx
.
Panel
(
self
,
wx
.
ID_ANY
,
size
=
self
.
GetSize
())
self
.
_notebook
=
wxaui
.
AuiNotebook
(
self
.
_mainPanel
,
wx
.
ID_ANY
,
style
=
wxaui
.
AUI_NB_DEFAULT_STYLE
^
wxaui
.
AUI_NB_TAB_MOVE
)
self
.
_notebook
=
wxaui
.
AuiNotebook
(
self
.
_mainPanel
,
wx
.
ID_ANY
,
style
=
wxaui
.
AUI_NB_DEFAULT_STYLE
&~
wxaui
.
AUI_NB_CLOSE_ON_ACTIVE_TAB
&~
wxaui
.
AUI_NB_TAB_MOVE
)
settingsPanel
=
wx
.
Panel
(
self
.
_mainPanel
,
wx
.
ID_ANY
)
...
...
@@ -321,7 +322,7 @@ class AtomSelectionPlugin(ComponentPlugin):
self
.
_selectionSummary
.
AppendText
(
"List of selected atoms:
\n
"
)
for
idx
in
self
.
_selection
:
self
.
_selectionSummary
.
AppendText
(
"
\t
%s
\n
"
%
self
.
_atoms
[
idx
].
fullName
())
self
.
_selectionSummary
.
AppendText
(
"
\t
%s
(MMTK index: %d)
\n
"
%
self
.
_atoms
[
idx
].
fullName
()
,
self
.
_atoms
[
idx
].
index
)
def
insert_keyword_values
(
self
,
keyword
,
values
):
...
...
@@ -378,7 +379,7 @@ class AtomSelectionPlugin(ComponentPlugin):
return
if
not
self
.
_selectors
.
has_key
(
selectionFilter
):
self
.
_selectors
[
selectionFilter
]
=
[
str
(
v
)
for
v
in
REGISTRY
[
"selector"
]
(
selectionFilter
,
self
.
_parent
.
trajectory
.
universe
).
choices
]
self
.
_selectors
[
selectionFilter
]
=
[
str
(
v
)
for
v
in
REGISTRY
[
"selector"
]
[
selectionFilter
](
self
.
_parent
.
trajectory
.
universe
).
choices
]
self
.
values
.
Set
(
self
.
_selectors
[
selectionFilter
])
...
...
MDANSE/App/GUI/MainFrame.py
View file @
ffd0bc20
...
...
@@ -207,6 +207,7 @@ https://github.com/eurydyce/MDANSE/tree/master/MDANSE
for any other request, please send an email to:
\t
pellegrini@ill.fr
\t
gonzalezm@ill.fr
\t
johnson@ill.fr
or directly to the MDANSE mailing list:
...
...
MDANSE/Framework/AtomSelectionParser.py
View file @
ffd0bc20
...
...
@@ -41,9 +41,9 @@ class AtomSelectionParserError(Error):
class
AtomSelectionParser
(
object
):
def
__init__
(
self
,
trajectory
):
def
__init__
(
self
,
universe
):
self
.
_universe
=
trajectory
.
universe
self
.
_universe
=
universe
def
operator_and
(
self
,
token
):
...
...
MDANSE/Framework/Configurators/AtomSelectionConfigurator.py
View file @
ffd0bc20
...
...
@@ -92,7 +92,7 @@ class AtomSelectionConfigurator(IConfigurator):
ud
=
UD_STORE
[
trajConfig
[
"basename"
],
"atom_selection"
,
value
]
# The input value is an atom selection string: parse it and update the configuration
except
UserDefinitionError
:
parser
=
AtomSelectionParser
(
trajConfig
[
"instance"
])
parser
=
AtomSelectionParser
(
trajConfig
[
"instance"
]
.
universe
)
self
[
"indexes"
]
=
parser
.
parse
(
value
)
self
[
"expression"
]
=
value
else
:
...
...
MDANSE/Framework/Configurators/AtomTransmutationConfigurator.py
View file @
ffd0bc20
...
...
@@ -89,7 +89,7 @@ class AtomTransmutationConfigurator(IConfigurator):
trajConfig
=
configuration
[
self
.
_dependencies
[
'trajectory'
]]
parser
=
AtomSelectionParser
(
trajConfig
[
"instance"
])
parser
=
AtomSelectionParser
(
trajConfig
[
"instance"
]
.
universe
)
# If the input value is a dictionary, it must have a selection string as key and the element
# to be transmutated to as value
...
...
MDANSE/Framework/Jobs/Converters/DMol.py
0 → 100644
View file @
ffd0bc20
#MDANSE : Molecular Dynamics Analysis for Neutron Scattering Experiments
#------------------------------------------------------------------------------------------
#Copyright (C)
#2015- Eric C. Pellegrini Institut Laue-Langevin
#BP 156
#6, rue Jules Horowitz
#38042 Grenoble Cedex 9
#France
#pellegrini[at]ill.fr
#goret[at]ill.fr
#aoun[at]ill.fr
#
#This library is free software; you can redistribute it and/or
#modify it under the terms of the GNU Lesser General Public
#License as published by the Free Software Foundation; either
#version 2.1 of the License, or (at your option) any later version.
#
#This library is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#Lesser General Public License for more details.
#
#You should have received a copy of the GNU Lesser General Public
#License along with this library; if not, write to the Free Software
#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
'''
Created on Jun 4, 2015
@author: Eric C. Pellegrini
'''
from
MDANSE.Framework.Jobs.Converters.Discover
import
DiscoverConverter
class
DMolConverter
(
DiscoverConverter
):
"""
Converts a DMol trajectory to a MMTK trajectory.
"""
type
=
'dmol'
label
=
"DMol"
\ No newline at end of file
MDANSE/Framework/Selectors/AtomFullName.py
View file @
ffd0bc20
...
...
@@ -34,12 +34,12 @@ from MDANSE.Framework.Selectors.ISelector import ISelector
class
AtomFullName
(
ISelector
):
type
=
"atomfullname"
type
=
"atom
_
fullname"
section
=
"atoms"
def
__init__
(
self
,
universe
):
ISelector
.
__init__
(
self
,
universe
)
self
.
_choices
.
extend
(
sorted
(
set
([
at
.
fullName
().
strip
().
lower
()
for
at
in
self
.
_universe
.
atomList
()])))
...
...
MDANSE/Framework/Selectors/AtomIndex.py
View file @
ffd0bc20
...
...
@@ -34,7 +34,7 @@ from MDANSE.Framework.Selectors.ISelector import ISelector
class
AtomIndex
(
ISelector
):
type
=
"atomindex"
type
=
"atom
_
index"
section
=
"atoms"
...
...
MDANSE/Framework/Selectors/AtomName.py
View file @
ffd0bc20
...
...
@@ -34,7 +34,7 @@ from MDANSE.Framework.Selectors.ISelector import ISelector
class
AtomName
(
ISelector
):
type
=
"atomname"
type
=
"atom
_
name"
section
=
"atoms"
...
...
MDANSE/Framework/Selectors/AtomPicked.py
View file @
ffd0bc20
...
...
@@ -34,6 +34,6 @@ from MDANSE.Framework.Selectors.AtomIndex import AtomIndex
class
AtomPicked
(
AtomIndex
):
type
=
"atompicked"
type
=
"atom
_
picked"
section
=
"miscellaneous"
MDANSE/Framework/Selectors/AtomSymbol.py
View file @
ffd0bc20
...
...
@@ -34,7 +34,7 @@ from MDANSE.Framework.Selectors.ISelector import ISelector
class
AtomSymbol
(
ISelector
):
type
=
"atomsymbol"
type
=
"atom
_
symbol"
section
=
"atoms"
...
...
MDANSE/Framework/Selectors/AtomType.py
View file @
ffd0bc20
...
...
@@ -34,7 +34,7 @@ from MDANSE.Framework.Selectors.ISelector import ISelector
class
AtomType
(
ISelector
):
type
=
"atomtype"
type
=
"atom
_
type"
section
=
"atoms"
...
...
MDANSE/Framework/Selectors/CarboHydrogen.py
View file @
ffd0bc20
...
...
@@ -34,7 +34,7 @@ from MDANSE.Framework.Selectors.ISelector import ISelector
class
CarboHydrogen
(
ISelector
):
type
=
"carbohydrogen"
type
=
"carbo
_
hydrogen"
section
=
"hydrogens"
...
...
MDANSE/Framework/Selectors/ChainName.py
View file @
ffd0bc20
...
...
@@ -36,7 +36,7 @@ from MDANSE.Framework.Selectors.ISelector import ISelector
class
ChainName
(
ISelector
):
type
=
"chainname"
type
=
"chain
_
name"
section
=
"proteins"
...
...
MDANSE/Framework/Selectors/HeteroHydrogen.py
View file @
ffd0bc20
...
...
@@ -34,7 +34,7 @@ from MDANSE.Framework.Selectors.ISelector import ISelector
class
HeteroHydrogenBound
(
ISelector
):
type
=
"heterohydrogen"
type
=
"hetero
_
hydrogen"
section
=
"hydrogens"
...
...
MDANSE/Framework/Selectors/MoleculeIndex.py
View file @
ffd0bc20
...
...
@@ -27,7 +27,7 @@
'''
Created on Mar 27, 2015
@
author:
p
ellegrini
:
author:
Eric C. P
ellegrini
'''
from
MDANSE.Framework.Selectors.ISelector
import
ISelector
...
...
MDANSE/Framework/Selectors/NitroHydrogen.py
View file @
ffd0bc20
...
...
@@ -34,7 +34,7 @@ from MDANSE.Framework.Selectors.ISelector import ISelector
class
NitroHydrogen
(
ISelector
):
type
=
"nitrohydrogen"
type
=
"nitro
_
hydrogen"
section
=
"hydrogens"
...
...
MDANSE/Framework/Selectors/OxyHydrogen.py
View file @
ffd0bc20
...
...
@@ -34,7 +34,7 @@ from MDANSE.Framework.Selectors.ISelector import ISelector
class
OxyHydrogen
(
ISelector
):
type
=
"
O-H
"
type
=
"
oxy_hydrogen
"
section
=
"hydrogens"
...
...
MDANSE/Framework/Selectors/PythonScript.py
View file @
ffd0bc20
...
...
@@ -34,7 +34,7 @@ from MDANSE.Framework.Selectors.ISelector import ISelector
class
PythonScript
(
ISelector
):
type
=
"pythonscript"
type
=
"python
_
script"
section
=
None
...
...
MDANSE/Framework/Selectors/ResidueType.py
View file @
ffd0bc20
...
...
@@ -36,7 +36,7 @@ from MDANSE.Framework.Selectors.ISelector import ISelector
class
ResType
(
ISelector
):
type
=
"restype"
type
=
"res
idue_
type"
section
=
"proteins"
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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