Skip to content

Structure creation by hand #184

@theasjblog

Description

@theasjblog

Hi,
I am trying to create some structures by hand, and I started from the sample code provided in the documentation:

var structure = new pv.mol.Mol();
var chain = structure.addChain('A');
for (var i = 0; i < 10; ++i) {
var residue = chain.addResidue('ABC', i);
residue.addAtom('X', [i, 0, 0], 'C');
}

This should give a molecule with 10 atoms, but it rather seems to create 10 individual atoms. Is there any way to 'link' atoms?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions