nglview.adaptor¶
Module contents¶
-
class
nglview.adaptor.
TextStructure
(text, ext='pdb', params={})[source]¶ Bases:
nglview.base_adaptor.Structure
-
class
nglview.adaptor.
RdkitStructure
(rdkit_mol, ext='pdb')[source]¶ Bases:
nglview.base_adaptor.Structure
-
class
nglview.adaptor.
ASEStructure
(ase_atoms, ext='pdb', params={})[source]¶ Bases:
nglview.base_adaptor.Structure
-
class
nglview.adaptor.
SimpletrajTrajectory
(path, structure_path)[source]¶ Bases:
nglview.base_adaptor.Trajectory
,nglview.base_adaptor.Structure
simpletraj adaptor.
>>> import nglview as nv >>> t = nv.SimpletrajTrajectory(nv.datafiles.XTC, nv.datafiles.GRO) >>> w = nv.NGLWidget(t) >>> w
-
n_frames
¶
-
-
class
nglview.adaptor.
MDTrajTrajectory
(trajectory)[source]¶ Bases:
nglview.base_adaptor.Trajectory
,nglview.base_adaptor.Structure
mdtraj adaptor.
>>> import nglview as nv >>> import mdtraj as md >>> traj = md.load(nv.datafiles.XTC, nv.datafiles.GRO) >>> t = MDTrajTrajectory(traj) >>> w = nv.NGLWidget(t) >>> w
-
n_frames
¶
-
-
class
nglview.adaptor.
PyTrajTrajectory
(trajectory)[source]¶ Bases:
nglview.base_adaptor.Trajectory
,nglview.base_adaptor.Structure
PyTraj adaptor.
>>> import nglview as nv >>> import pytraj as pt >>> traj = pt.load(nv.datafiles.TRR, nv.datafiles.PDB) >>> t = nv.PyTrajTrajectory(traj) >>> w = nv.NGLWidget(t) >>> w
-
n_frames
¶
-
-
class
nglview.adaptor.
ParmEdTrajectory
(trajectory)[source]¶ Bases:
nglview.base_adaptor.Trajectory
,nglview.base_adaptor.Structure
ParmEd adaptor.
-
n_frames
¶
-
-
class
nglview.adaptor.
MDAnalysisTrajectory
(atomgroup)[source]¶ Bases:
nglview.base_adaptor.Trajectory
,nglview.base_adaptor.Structure
MDAnalysis adaptor.
Can take either a Universe or AtomGroup.
>>> import nglview as nv >>> import MDAnalysis as mda >>> u = mda.Universe(nv.datafiles.GRO, nv.datafiles.XTC) >>> prot = u.select_atoms('protein') >>> t = nv.MDAnalysisTrajectory(prot) >>> w = nv.NGLWidget(t) >>> w
-
n_frames
¶
-