You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
There is a connect in mol.mol, but you need the two atom objects/views to do the connection. There is also a magical deriveConnectivity function in mol.mol that does some bond-guessing by distance, which could work without the objects because it does the guessing for the entire chain.
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?
The text was updated successfully, but these errors were encountered: