Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GromacsOnEUREKA
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Winokan, Max S Dr (PG/R - Maths & Physics)
GromacsOnEUREKA
Commits
6d0f726a
Commit
6d0f726a
authored
4 years ago
by
Winokan, Max S Dr (PG/R - Maths & Physics)
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://gitlab.eps.surrey.ac.uk/mw00368/GromacsOnEUREKA
parents
550d07a9
6592c59f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
any2pdb.py
+44
-0
44 additions, 0 deletions
any2pdb.py
with
44 additions
and
0 deletions
any2pdb.py
0 → 100755
+
44
−
0
View file @
6d0f726a
#!/usr/bin/env python
import
argparse
import
mout
# https://github.com/mwinokan/MPyTools
import
mcol
# https://github.com/mwinokan/MPyTools
# import mplot # https://github.com/mwinokan/MPyTools
import
asemolplot
as
amp
# https://github.com/mwinokan/AseMolPlot
import
os
##########################################################################
argparser
=
argparse
.
ArgumentParser
(
description
=
'
Convert traj Coordinates to a Gromacs suitable PDB
'
)
argparser
.
add_argument
(
"
-i
"
,
"
--input
"
,
help
=
"
Input file
"
)
argparser
.
add_argument
(
"
-o
"
,
"
--output
"
,
help
=
"
Output file
"
)
args
=
argparser
.
parse_args
()
##########################################################################
if
args
.
input
is
None
:
mout
.
errorOut
(
"
No input file specified
"
,
fatal
=
True
)
if
args
.
output
is
None
:
pre
,
ext
=
os
.
path
.
splitext
(
args
.
input
)
outfile
=
pre
+
"
.pdb
"
mout
.
warningOut
(
"
No output file specified, defaulted to
"
+
mcol
.
file
+
outfile
)
else
:
outfile
=
args
.
output
try
:
atoms
=
amp
.
read
(
args
.
input
)
except
:
mout
.
errorOut
(
"
Could not read file!
"
,
fatal
=
True
)
amp
.
write
(
"
__temp__.pdb
"
,
atoms
)
os
.
system
(
"
grep -v MODEL __temp__.pdb | grep -v ENDMDL >
"
+
outfile
)
os
.
system
(
"
rm __temp__*
"
)
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