From 61226e6f5740165821fbbe195404a689bc5278d6 Mon Sep 17 00:00:00 2001 From: Martin Falk Date: Thu, 12 Dec 2024 13:26:45 +0100 Subject: [PATCH] MolVisPython: opaque types fix --- molvis/molvispython/python/molviscommon.py | 6 +++--- .../python/processors/MolecularStructureSource.py | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/molvis/molvispython/python/molviscommon.py b/molvis/molvispython/python/molviscommon.py index 7cee070b..c0416321 100644 --- a/molvis/molvispython/python/molviscommon.py +++ b/molvis/molvispython/python/molviscommon.py @@ -128,9 +128,9 @@ def createMolecularStructure(pos: List[numpy.array], :return: ivwmolvis.MolecularStructure """ - positions = [] - serialnumbers = [] - atomicnumbers = [] + positions: ivw.dvec3Vector = ivw.dvec3Vector() + serialnumbers: ivw.intVector = ivw.intVector() + atomicnumbers: list = [] for i, p in enumerate(pos): element = elements[i] diff --git a/molvis/molvispython/python/processors/MolecularStructureSource.py b/molvis/molvispython/python/processors/MolecularStructureSource.py index e8c1e593..cac9476c 100644 --- a/molvis/molvispython/python/processors/MolecularStructureSource.py +++ b/molvis/molvispython/python/processors/MolecularStructureSource.py @@ -99,11 +99,11 @@ def parseFile(filename): structure = parser.get_structure(structureName, filename) pos = [] - serialNumbers = [] - bfactors = [] - modelId = [] - chainId = [] - residueId = [] + serialNumbers: ivw.intVector = ivw.intVector() + bfactors: ivw.doubleVector = ivw.doubleVector() + modelId: ivw.intVector = ivw.intVector() + chainId: ivw.intVector = ivw.intVector() + residueId: ivw.intVector = ivw.intVector() atomFullName = [] elements = [] @@ -132,7 +132,7 @@ def parseFile(filename): elements.append(ivwmolvis.atomicelement.fromAbbr(atom.element)) atoms = ivwmolvis.Atoms() - dvec3pos = [] + dvec3pos: ivw.dvec3Vector = ivw.dvec3Vector() for p in pos: dvec3pos.append(ivw.glm.dvec3(p[0], p[1], p[2])) atoms.positions = dvec3pos