pub fn remove_molecule(&mut self, molid: usize) {
        let molecule = self.bondings.remove(molid);
        let first = molecule.start();
        let size = molecule.size();

        for _ in 0..size {
            let _ = self.particles.remove(first);
            let _ = self.molecule_ids.remove(first);
        }

        for molecule in self.bondings.iter_mut().skip(molid) {
            molecule.translate_by(-(size as isize));
        }

        for molid in self.molecule_ids.iter_mut().skip(first) {
            *molid -= 1;
        }
    }
/// Remove the molecule at index `i`
Remove the molecule at index `i`
Remove the molecule at index ` i `
pub fn remove_molecule(&mut self, molid: usize) {
        let molecule = self.bondings.remove(molid);
        let first = molecule.start();
        let size = molecule.size();
        for _ in 0..size {
            let _ = self.particles.remove(first);
            let _ = self.molecule_ids.remove(first);
        }
        for molecule in self.bondings.iter_mut().skip(molid) {
            molecule.translate_by(-(size as isize));
        }
        for molid in self.molecule_ids.iter_mut().skip(first) {
            *molid -= 1;
        }
    }
pub fn remove_molecule ( & mut self , molid : usize ) { let molecule = self . bondings . remove ( molid ) ; let first = molecule . start ( ) ; let size = molecule . size ( ) ; for _ in 0 .. size { let _ = self . particles . remove ( first ) ; let _ = self . molecule_ids . remove ( first ) ; } for molecule in self . bondings . iter_mut ( ) . skip ( molid ) { molecule . translate_by ( - ( size as isize ) ) ; } for molid in self . molecule_ids . iter_mut ( ) . skip ( first ) { * molid -= 1 ; } }
Remove the molecule at index `i`
Remove the molecule at index ` i `
&mut self
molid
usize