Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BCTC Supplements
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
AK Krewald
BCTC Supplements
Commits
f3e620cc
Commit
f3e620cc
authored
6 months ago
by
moritz.buchhorn
Browse files
Options
Downloads
Patches
Plain Diff
Add Trajectory constructor from orca output file
parent
7c0b7189
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
05-geometrien/support.py
+16
-1
16 additions, 1 deletion
05-geometrien/support.py
with
16 additions
and
1 deletion
05-geometrien/support.py
+
16
−
1
View file @
f3e620cc
...
...
@@ -2,6 +2,7 @@ import numpy as np
import
plotly.graph_objects
as
go
import
atom_properties
as
atomp
from
itertools
import
accumulate
import
qc_parser
as
qcp
class
XYZ
:
sphere_mode
=
"
ball
"
...
...
@@ -244,10 +245,24 @@ class XYZ:
class
Trajectory
:
def
__init__
(
self
,
coordinates
:
list
[
XYZ
]):
self
.
coordinates
=
coordinates
@classmethod
def
from_orca_output
(
cls
,
output_file
:
str
):
"""
Creates a Trajectory object from an ORCA output file.
Args:
output_file (str): The path to the ORCA output file.
Returns:
Trajectory: A Trajectory object.
"""
parsed
=
qcp
.
read_qc_file
(
output_file
)
return
cls
([
XYZ
(
frame
)
for
frame
in
parsed
[
"
coordinates
"
]])
def
get_molecular_viewer
(
self
,
resolution
:
int
=
64
,
rel_cutoff
:
float
=
0.5
)
->
go
.
Figure
:
"""
Returns a plotly figure with the molecular structure of the trajectory.
Returns a plotly figure with the molecular structure of the trajectory.
The figure comes with a slider that allows to switch between frames.
Args:
resolution (int, optional): The number of points to be generated. Defaults to 64.
...
...
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