espressomd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ESPResSo-users] Error while using analyze aggregation with molecules wi


From: Alexandre Diehl
Subject: [ESPResSo-users] Error while using analyze aggregation with molecules with different sizes
Date: Fri, 22 Apr 2016 16:08:51 -0300

Hi.

I'm trying to simulate a solution containing surfactants (n_mol_surf is the number of such molecules) and copolymers (n_mol_cop is the number of such molecules). The surfactants are n_monomers_surf in length and the copolymers are n_monomers_cop in length. To insert the surfactants I use:

for { set i 0 } { $i < $n_mol_surf } { incr i } {

    set posx [expr $boxl*[t_random]]
    set posy [expr $boxl*[t_random]]
    set posz [expr $boxl*[t_random]]
   
    polymer 1 $n_monomers_surf $sig_monomer_surf start [expr $i*$n_monomers_surf] pos $posx $posy $posz
mode PSAW charge $head_charge \
    distance $n_monomers_surf type [expr $monomer_surf + $i] $head_surf FENE $fene

    set molid $i

    for { set j 0 } { $j < $n_monomers_surf } { incr j } {
    part [expr $j + $i*$n_monomers_surf] mol $molid
    }
}

analyze set chains 0 $n_mol_surf $n_monomers_surf

To insert the copolymers I use:

 for { set i 0 } { $i < $n_mol_cop } { incr i } {
   
    set posx [expr $boxl*[t_random]]
    set posy [expr $boxl*[t_random]]
    set posz [expr $boxl*[t_random]]
   
    polymer 1 $n_monomers_cop $sig_neutro_cop start [expr $n_part + $i*$n_monomers_cop] pos $posx $posy $posz mode PSAW FENE $fene
   
    set molid $i
   
    for { set j 0 } { $j < $n_monomers_cop } {incr j } {
        if { $j < $n_mon_charge_block_cop } {
        part [expr $n_part + $j + $i*$n_monomers_cop] q $monomer_charge type $charged_cop mol [expr $n_mol_surf + $molid]
        } else {
        part [expr $n_part + $j + $i*$n_monomers_cop] type $neutro_cop mol [expr $n_mol_surf + $molid]
        }
    }
    }
   
    analyze set chains [expr $n_mol_surf*$n_monomers_surf] $n_mol_cop $n_monomers_cop

Using the two analyze set chains commands I expect that all particles are assigned to the correct molecules.

During the simulations period, when I use the command

analyze aggregation 2.0 0 [expr $n_mol_surf + $n_mol_cop - 1]

I got the following error message:

check your start and finish molecule id's
    while executing
"analyze aggregation 2.0 0 [expr $n_mol_surf + $n_mol_cop - 1]"

Anyone have any ideia of what am I missing?

All the best.

Alexandre

reply via email to

[Prev in Thread] Current Thread [Next in Thread]