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 vposof the functionserialize_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_numberis an integer with 0 referring to the first nucleotide of the element.coordinatesis a 3-element 1D numpy arraynucleotide_numbersshould be consecutive integers.Returns: A string with space-seperated numbers. Groups of three numbers are x,y,z coordinates of one residue.