Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pymolfile
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nomad-lab
pymolfile
Commits
83679e2b
Commit
83679e2b
authored
5 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
More debug out on import error.
parent
8bda178a
Branches
nomad-fair
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pymolfile/plugin_list.py
+9
-7
9 additions, 7 deletions
pymolfile/plugin_list.py
with
9 additions
and
7 deletions
pymolfile/plugin_list.py
+
9
−
7
View file @
83679e2b
...
@@ -4,6 +4,8 @@ import sys
...
@@ -4,6 +4,8 @@ import sys
try
:
try
:
from
.molfile
import
libpymolfile
from
.molfile
import
libpymolfile
except
ImportError
:
except
ImportError
:
import
traceback
traceback
.
print_exc
()
warnings
.
warn
(
"
libpymolfile package not available, pymolfile does not work without its library!
"
)
warnings
.
warn
(
"
libpymolfile package not available, pymolfile does not work without its library!
"
)
MAX_NUM_PLUGINS
=
200
MAX_NUM_PLUGINS
=
200
...
@@ -18,8 +20,8 @@ def byte_str_decode(data, dectype=None):
...
@@ -18,8 +20,8 @@ def byte_str_decode(data, dectype=None):
def
plugins
():
def
plugins
():
"""
Information on the available molfile plugins
"""
Information on the available molfile plugins
Example tuple: (
'
psf
'
,
'
psf
'
, 1, 1, 1, 0, 1, 1, 1, 0,
Example tuple: (
'
psf
'
,
'
psf
'
, 1, 1, 1, 0, 1, 1, 1, 0,
'
CHARMM,NAMD,XPLOR PSF
'
,
'
mol file reader
'
,
'
CHARMM,NAMD,XPLOR PSF
'
,
'
mol file reader
'
,
'
Justin Gullingsrud, John Stone
'
, 1, 9, 17, 1)
'
Justin Gullingsrud, John Stone
'
, 1, 9, 17, 1)
The fields in the tuple represent info in ordered as follows:
The fields in the tuple represent info in ordered as follows:
...
@@ -39,18 +41,18 @@ def plugins():
...
@@ -39,18 +41,18 @@ def plugins():
14: major version of the plugin
14: major version of the plugin
15: minor version of the plugin
15: minor version of the plugin
16: ABI version of the plugin
16: ABI version of the plugin
17: 1 if is reentrant (returns is_reentrant)
17: 1 if is reentrant (returns is_reentrant)
Returns: A list of tuples that includes the information and
Returns: A list of tuples that includes the information and
capabilities of each molfile plugin. The information is
capabilities of each molfile plugin. The information is
extracted from molfile_plugin_t.
extracted from molfile_plugin_t.
"""
"""
global
C_MOLFILE_PLUGINS
global
C_MOLFILE_PLUGINS
numlist
=
libpymolfile
.
molfile_init
()
numlist
=
libpymolfile
.
molfile_init
()
if
sys
.
version_info
>
(
3
,):
if
sys
.
version_info
>
(
3
,):
basestring
=
str
basestring
=
str
plugins_list
=
[
plugins_list
=
[
[
byte_str_decode
(
item
,
[
byte_str_decode
(
item
,
dectype
=
"
unicode_escape
"
)
for
item
in
libpymolfile
.
molfile_plugin_info
(
dectype
=
"
unicode_escape
"
)
for
item
in
libpymolfile
.
molfile_plugin_info
(
C_MOLFILE_PLUGINS
,
i
)
C_MOLFILE_PLUGINS
,
i
)
]
for
i
in
range
(
numlist
)
]
for
i
in
range
(
numlist
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment