This is a problem in the 4.2.x branch and the master branch.
Structure.clone() is described as "Return an identical copy of this Structure object".
-
If the original Structure was parsed with the FileParsingParameters.setCreateAtomBonds(true), a Structure will be created there each Atom in the Structure has a list of Bonds to describing connections to other Atom instances.
-
If you then make a deep copy by Structure.clone(), the new Structure will be missing any Bond information inside the cloned Atom instances.
I would expect that connectivity would also be preserved in a deep copy.
TestClone.java.gz
This is a problem in the 4.2.x branch and the master branch.
Structure.clone() is described as "Return an identical copy of this Structure object".
If the original Structure was parsed with the FileParsingParameters.setCreateAtomBonds(true), a Structure will be created there each Atom in the Structure has a list of Bonds to describing connections to other Atom instances.
If you then make a deep copy by Structure.clone(), the new Structure will be missing any Bond information inside the cloned Atom instances.
I would expect that connectivity would also be preserved in a deep copy.
TestClone.java.gz