forgi 2.0.0 documentation

«  forgi.threedee.utilities.cytvec module   ::   Contents   ::   forgi.threedee.visual package  »

forgi.threedee.utilities.virtual_residues module

forgi.threedee.utilities.virtual_residues.parse_vres(parts)[source]

Go back from a splitted serialized representation to a dictionary used for vres.

Parameters:parts – A list of strings which hold floats. The length has to be a multiple of 3. Like a list gegerated by serialize_vres(vpos).split()
Returns:A dictionary {nucleotide_number: coordinated}. See param vpos of the function serialize_vres
forgi.threedee.utilities.virtual_residues.serialize_vres(vpos)[source]

Output carthesian coordinates for each virtual residue, ordered by nucleotide number and seperated by space.

The returned coordinates are relative to the element’s coordinate system.

Parameters:vpos – A dictionary {nucleotide_number: coordinates}. nucleotide_number is an integer with 0 referring to the first nucleotide of the element. coordinates is a 3-element 1D numpy array nucleotide_numbers should be consecutive integers.
Returns:A string with space-seperated numbers. Groups of three numbers are x,y,z coordinates of one residue.

«  forgi.threedee.utilities.cytvec module   ::   Contents   ::   forgi.threedee.visual package  »